http: // is not a valid URL, so if you want to allow it there are 2 options anyway
hope that helps
EDIT
I forgot: you do not need to set the required, but 'allowEmpty' => true
required → the form must contain the xyz field, which is sent to the server
allowEmpty -> the field may be empty
I added a link to the callback function above, but anyway ... here:
in your model class (I just assume that it is User ):
class User extends AppModel { .. function beforeValidate() { if (isset($this->data['User']['url']) && $this->data['User']['url'] == 'http://') { $this->data['User']['url'] = ''; } return true; } .. }
source share