Quantcast
Channel: alvinalexander.com - field
Viewing all articles
Browse latest Browse all 31

CakePHP require, notEmpty, allowEmpty, and form validation

$
0
0

CakePHP require, notEmpty, and allowEmpty FAQ: Help, I'm trying to edit my CakePHP model $validate field to make sure a CakePHP form field is required, but 'require' doesn't seem to be working as expected.

After fighting with a CakePHP form I just got this information beat into my head, so I thought I'd share it here. In short, if you want to make a CakePHP form field required, what you really want to use is the CakePHP notEmpty rule, like this:

read more


Viewing all articles
Browse latest Browse all 31

Trending Articles