Fork me on GitHub

Nibble Development

Nibble Development

PHP classes and libraries for developers

Custom error messages

Each form field in Nibble forms has a PHP method that allows a custom error message to be set that overrides the default messages. This can be useful if one form requires a different message to the rest of the forms on the site. (If all of the forms on the site require a different message to the default ones it would be quicker to change the values in the PHP classes themselves). For example, an email form is invalid if it is empty (depending on the required argument being True) or the value submitted is not a valid email address. Knowing this means a generic polite error message that covers both instances could be set:

Luke Rotherfield

Freelance PHP Developer
is a PHP developer dedicated to writing the most awesome liraries for his fellow devs :) enjoy

Latest posts by Luke Rotherfield (see all)

Leave a Comment