You are here

public function FocalPointManager::validateFocalPoint in Focal Point 8

Validates focal point string representation.

Parameters

string $focal_point: Focal point as submitted in the form. For example: 23,64 is valid while 123,942 and foo,bar are not.

Return value

bool TRUE if valid and FALSE if not.

Overrides FocalPointManagerInterface::validateFocalPoint

File

src/FocalPointManager.php, line 42

Class

FocalPointManager
Provides business logic related to focal point.

Namespace

Drupal\focal_point

Code

public function validateFocalPoint($focal_point) {
  return (bool) preg_match(static::FOCAL_POINT_VALIDATION_REGEXP, $focal_point);
}