Put the input needed in cakephp

I have a form in cakephp that has some inputs that are for confirmation only, these fields are not fields that belong to the table database. Like this:

Password confirmation field, this field is not in the database, it is just a check of some logical things. How can I make this field mandatory (notEmpty rule)? Is it right to create this “check” on the model, even if this field does not apply to the table of this model?

+4
source share
1 answer

Yes, you can check fields that are not in the database - as usual. It just doesn’t save anything in the database (of course).

Links to verification information (to save whoever finds this answer in a Google search):

Checking CakePHP 2.x

CakePHP 1.3 Check

+1
source

Source: https://habr.com/ru/post/1399521/


All Articles