Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

Found 1 of 138 records in table Wiki
Now Showing 1 of 1

Current Record: validateRegistrationForm



validateRegistrationForm() hook

A hook that validates the input into the user registration form to make sure that the input is valid.


function validateRegistrationForm( array $values ) : mixed


Name Description
$values An associative array of the input values of the registration form.
returns Mixed. If this method returns a PEAR_Error object then the validation will fail - and the user will be asked to correct his input.


class conf_ApplicationDelegate {
    function validateRegistrationForm($values){
        if ( $values['age'] < 18 ){
            return PEAR::raiseError("Sorry you must be at least 18 years old to join this site.");
        return true;

Validation via the Users table Delegate class

Note that since the registration form is just a "new record form" for the users table, it is also possible (and preferred) to do validation through the users table delegate class?.

See Also

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2018 All rights reserved