28 public function validate($string, $config, $context)
30 $string = trim($string);
31 if ($string ===
'0') {
37 $length = strlen($string);
38 if (substr($string, $length - 2) ==
'px') {
39 $string = substr($string, 0, $length - 2);
41 if (!is_numeric($string)) {
54 if ($this->max !== null && $int > $this->max) {
64 public function make($string)
71 $class = get_class($this);
72 return new $class(
$max);