I am trying to check the Acos table for words in the alias field to prevent a user from creating a slug called "users' or "profiles" or any other method / action / function in the site when they sign up and select a unique URL This is in my User model and called from the validation ruleset 'slug-notRestricted' => array( 'rule' => array('checkRestricted', 'slug'), 'message' => 'The unique URL you selected is restricted.', 'last' => true)), function checkRestricted($data) { $valid = false; $q = $this->query("SELECT Aco.alias From acos AS Aco WHERE Aco.alias LIKE '%" . $data . "%' OR Aco.alias = '$data'"); if(empty($q)){ $valid = true; } return $valid; } But nothing happens. Any ideas where i went wrong? I am using jquery to validate remote so in firebug I see under the POST TAB: data[User][slug] admin fieldname slug
Thanks Dave -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.