You are here

class CvFAPIMinlengthValidator in Clientside Validation 7.2

Hierarchy

Expanded class hierarchy of CvFAPIMinlengthValidator

1 string reference to 'CvFAPIMinlengthValidator'
fapiminlength.inc in clientside_validation_fapi/plugins/validator/fapiminlength.inc

File

clientside_validation_fapi/plugins/validator/fapiminlength.inc, line 15

View source
class CvFAPIMinlengthValidator extends CvFAPIValidator {
  public function getMessage(array $element) {
    $rule = $this
      ->getRule($element);
    return isset($rule['error']) && $rule['error'] ? t($rule['error'], array(
      '%field' => $element['#title'],
    )) : t('Invalid size of !title value.', array(
      '!title' => $element['#title'],
    ));
  }
  public function getJsArg(array $element) {
    $rule = $this
      ->getRule($element);
    return is_array($rule['params']) ? $rule['params'][0] : $rule['params'];
  }

}

Members