function __construct($field_name, $table_name, $table_field = '', $error_message = '')
 {
     parent::__construct($field_name);
     $this->table_name = $table_name;
     $this->table_field = $table_field ? $table_field : $field_name;
     $this->error_message = $error_message;
 }
 function __construct($field_name, $node, $error_message, $parent_id = false)
 {
     $this->node = $node;
     $this->field_name = $field_name;
     $this->error_message = $error_message;
     $this->parent_id = $parent_id;
     parent::__construct($field_name);
 }
예제 #3
0
 /**
  * Constructor
  * If only two agruments given - use second argument as maximun field length
  * If all three agruments given - use second argument as manimum field length and third - as maximum field length
  * @param string fieldname to validate
  * @param int Minumum or maximum length
  * @param int Maximum length (optional)
  */
 function __construct($field_name, $min_or_max_length, $max_length = NULL, $custom_error = '')
 {
     parent::__construct($field_name, $custom_error);
     if (is_null($max_length)) {
         $this->min_length = NULL;
         $this->max_length = $min_or_max_length;
     } else {
         $this->min_length = $min_or_max_length;
         $this->max_length = $max_length;
     }
 }
예제 #4
0
 /**
  * @param string Field name
  * @param string Pattern to match against
  */
 function __construct($field_name, $pattern, $custom_error = '')
 {
     parent::__construct($field_name, $custom_error);
     $this->pattern = $pattern;
 }
 /**
  * @param string Field name
  * @param int Number of whole digits allowed
  * @param int Number of decimal digits allowed
  */
 function __construct($field_name, $whole_digits, $decimal_digits = 0, $custom_error = '')
 {
     parent::__construct($field_name, $custom_error);
     $this->whole_digits = $whole_digits;
     $this->decimal_digits = $decimal_digits;
 }
예제 #6
0
 function __construct($field_name, $invalid_value, $custom_error = '')
 {
     parent::__construct($field_name, $custom_error);
     $this->invalid_value = $invalid_value;
 }
예제 #7
0
 function __construct($field_name, $type, $custom_error = '{Field} must contain only "{Type}" values')
 {
     $this->type = $type;
     $custom_error = str_replace('{Type}', $type, $custom_error);
     parent::__construct($field_name, $custom_error);
 }
 function __construct($field, $user)
 {
     $this->user = $user;
     parent::__construct($field);
 }
 function __construct($field_name, $text_block)
 {
     $this->text_block = $text_block;
     parent::__construct($field_name);
 }
예제 #10
0
 function __construct($field_name, $type = lmbDateRule::TYPE_ISO, $custom_error = '')
 {
     parent::__construct($field_name, $custom_error);
     $this->type = $type;
 }
 /**
  * @param string Field name
  * @param float Min value
  * @param float Max value
  */
 function __construct($field_name, $min_value, $max_value, $custom_error = '')
 {
     parent::__construct($field_name, $custom_error);
     $this->min_value = $min_value;
     $this->max_value = $max_value;
 }
 function __construct($field, $class, $object, $custom_error = '')
 {
     $this->object = $object;
     $this->class = $class;
     parent::__construct($field, $custom_error);
 }
예제 #13
0
 /**
  * Constructor.
  * @param string Field name
  * @param array List of restricted values
  * @param string Custom error message
  */
 function __construct($field_name, $restricted_values, $custom_error = '')
 {
     parent::__construct($field_name, $custom_error);
     $this->restricted_values = $restricted_values;
 }
예제 #14
0
 function __construct($field_name, $type, $custom_error = '{Field} must contain only integer values')
 {
     $this->type = $type;
     parent::__construct($field_name, $custom_error);
 }