Skip to content

Instantly share code, notes, and snippets.

@destinydriven
Created May 18, 2018 01:37
Show Gist options
  • Save destinydriven/19a4da961f61d60ce6c083bc9a83e211 to your computer and use it in GitHub Desktop.
Save destinydriven/19a4da961f61d60ce6c083bc9a83e211 to your computer and use it in GitHub Desktop.
public $validate = array(
'employee_id' => array(
'required' => array(
'rule' => array('notBlank'),
'required' => true,
'allowEmpty' => false,
'message' => 'Employee ID must be specified!'
),
),
'email' => array(
'valid_email' => array(
'rule' => 'email',
'message' => 'Enter a valid email address',
'allowEmpty' => true,
'required' => false
)
),
'address_line_1' => array(
'required' => array(
'rule' => array('notBlank'),
'required' => true,
'allowEmpty' => false,
'message' => 'Please enter an address'
),
),
'country_id' => array(
'required' => array(
'rule' => array('notBlank'),
'required' => true,
'allowEmpty' => false,
'message' => 'Please select country'
),
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment