I'm using Cakephp (v3.0). I have got a field "num_max_intents" that I want that only takes values greater than 0 and also I want that "date" field be greater than actual date.. My validationDefault() code is the next:
public function validationDefault(Validator $validator){
$validator->notEmpty('num_max_intents')
->notEmpty('package')
->notEmpty('date');
return $validator;
}
What's the simplest way to do this?