class Model_User extends Orm\Model {In the case of the above Model_User a value of "me" for name will result in an error message of "The field name has to contain at least 3 characters." I would like to override the error message in this case but not for other uses of "min_length"
protected static $_properties = array(
'id',
'name' => array(
'data_type' => 'varchar',
'validation' => array('required', 'min_length' => array(3), 'max_length' => array(50))
),
'email' => array(
'data_type' => 'varchar',
'validation' => array('required', 'valid_email')
),
'mobile' => array(
'validation' => array('required', 'valid_mobile', 'unique' => array('users.mobile'))
),
'pword' => array(
'data_type' => 'varchar',
'validation' => array('required', 'min_length' => array(6), 'max_length' => array(20))
),
'pin' => array(
'data_type' => 'tinyint'
),
'sms_id' => array(
'data_type' => 'integer'
),
'verified' => array(
'data_type' => 'tinyint',
'validation' => array('required'),
'default' => 0
),
'lastlogin',
'createdon',
'auth_token',
'auth_token_expires' => array('default' => 0)
);
protected static $_observers = array(
'Orm\\Observer_Validation',
'Orm\\Observer_Typing'
);
}
It looks like you're new here. If you want to get involved, click one of these buttons!