Re: Validating not in list

2010-03-31 Thread moos3
What you are going to want to is this,in your add or create cunstion add this bit of code: $nicknames=array('mike','gizmo','root'); if (in_array($this-data['User']['username'],$nicknames)){ $this-Session-setFlash('nickname is reserved please try another one', 'default', array('class'='bad');

Re: Validating not in list

2010-03-31 Thread John Andersen
I would go with the custom validation, as you suggested! Enjoy, John On Mar 30, 10:19 pm, Bart vangeneug...@gmail.com wrote: Hello, I'm trying to build an application that is User based. However, I want to reserve some nicknames so you can't register them. When going over the validation

Re: Validating not in list

2010-03-31 Thread Bart Vangeneugden
Hello, thanks for the responses. I used custom validation the way moos3 suggested. Thanks, Bart On Wed, Mar 31, 2010 at 18:33, John Andersen j.andersen...@gmail.comwrote: I would go with the custom validation, as you suggested! Enjoy, John On Mar 30, 10:19 pm, Bart

Validating not in list

2010-03-30 Thread Bart
Hello, I'm trying to build an application that is User based. However, I want to reserve some nicknames so you can't register them. When going over the validation rules, I find http://book.cakephp.org/view/1171/inList Which is basically what I need, but negated. Is there a way to say something