20 $string = trim($string);
25 $parent_result = parent::validate($string,
$config, $context);
26 if ($parent_result !==
false) {
27 return $parent_result;
30 $length = strlen($string);
31 $last_char = $string[$length - 1];
33 if ($last_char !==
'*') {
37 $int = substr($string, 0, $length - 1);
42 if (!is_numeric($int)) {
56 return ((
string)$int) .
'*';
Validates a MultiLength as defined by the HTML spec.
validate($string, $config, $context)
Validates the HTML type length (not to be confused with CSS's length).