Validator for three values and message

Validator for three values and message

hyklhykl Posts: 48Questions: 19Answers: 5
edited December 2016 in Editor

I want to ask how the validation - for example:

Field::inst('column1'),
Field::inst('column2'),
Field::inst('column3')

->validator(function($val, $data, $opts) {
       if (($data['column1'] + $data['column2'] + $data['column3']) > 15)) {
                        return 'big value ! Must 0 to 15';
                    }
                    return true;
                }),

Not working and please to help and thank you very much !

This question has an accepted answers - jump to answer

Answers

  • hyklhykl Posts: 48Questions: 19Answers: 5
    Answer ✓

    This is solved :-)

This discussion has been closed.