I dont think the validation checks are being run.

here is the current attempt:

    var $validate = array(
        'username' => array(
            'notempty' => array(
                'rule' => array('minLength', 1),
                'required' => true,
                'allowEmpty' => false,
                'message' => 'Username cannot be empty'
            ),
            'unique' => array(
                'rule' => array('checkUnique', 'username'),
                'message' => 'Username taken. Use another.'
            )
        )


This is the checkUnique function:

    function checkUnique($data, $fieldName) {
        e('YOU SHOULD SEE THIS');
        $valid = false;
        if(isset($fieldName) && $this->hasField($fieldName)) {
            $valid = $this->isUnique(array($fieldName=>$data));
        }
        return $valid;
    }


The echo never seems to take place.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to