src/Elements/Parents/Field.php
public function validateMaxLength($value)
  {
    if (!isset($this->attr["maxlength"])) return true;

		$maxlength = trim($this->attr["maxlength"]);
    $length = strlen($value);

    if ($length > $maxlength) {
      $this->errors[] =  "\"{$this->label}\" contains {$length} characters, but it is limited to {$maxlength} characters. Please shorten the length.";
			return false;
		}

		return true;
  }
public function validateMaxLength($value)
  {
    if (!isset($this->attr["maxlength"])) return true;

		$maxlength = trim($this->attr["maxlength"]);
    $length = strlen($value);

    if ($length > $maxlength) {
      $this->errors[] =  "\"{$this->label}\" contains {$length} characters, but it is limited to {$maxlength} characters. Please shorten the length.";
			return false;
		}

		return true;
  }
public function validateMaxLength ( $ value ) { if ( ! isset ( $ this -> attr [ "maxlength" ] ) ) return true ; $ maxlength = trim ( $ this -> attr [ "maxlength" ] ) ; $ length = strlen ( $ value ) ; if ( $ length > $ maxlength ) { $ this -> errors [ ] = "\"{$this->label}\" contains {$length} characters, but it is limited to {$maxlength} characters. Please shorten the length." ; return false ; } return true ; }
Validates the maximum length of a form element.

@param  string $value   Current value of form field
@return boolean
Validates the maximum length of a form element .