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) . 
'*';
 
An exception for terminatinating execution or to throw for unit testing.
Validates the HTML type length (not to be confused with CSS's length).
Validates a MultiLength as defined by the HTML spec.
validate($string, $config, $context)