1

I am working on CakePHP 3.0 validation, In that, I found that we can only pass static validation message.

I am trying to pass custom value like field name or length in minimum and maximum validation

Example :

public function validationDefault(Validator $validator) {
    $validator
        ->requirePresence('rt_code', 'create')
        ->notEmpty('rt_code', ['Please enter value in %s.' , 'code'] );

    return $validator;
}

Is there any way to fulfill this functionality?

Bhavin Solanki
  • 1,364
  • 11
  • 27
  • 1
    This is a duplicate of http://stackoverflow.com/questions/41600948/cakephp-3-dynamic-validation-error-messages – floriank Jan 12 '17 at 10:42

0 Answers0