-
☆ A M B ☆
- 24,524 Posts
I can't get any validation messages other than "This is a required field."
I'm trying to set up an isNumber field.
This is the FormIt snippet:
[[!FormIt?
&hooks=`spam,email`
&emailTpl=`zafEmailChunk`
&emailTo=`[email protected]`
&validate=`name:required,
phone-no:isNumber`
]]
I tried adding a custom error message:
[[!FormIt?
&hooks=`spam,email`
&emailTpl=`zafEmailChunk`
&emailTo=`[email protected]`
&phone-no.vTextIsNumber=`Phone number must be a number.`
&validate=`name:required,
phone-no:isNumber`
]]
nothing, what looks wrong there.
Just a guess:
perhaps it doesn't like the minus in 'phone-no'
-
☆ A M B ☆
- 24,524 Posts
-
☆ A M B ☆
- 24,524 Posts
Nope. Still just get the "this field is required" message. As far as I can tell, the isNumber validator isn't working at all.
-
☆ A M B ☆
- 24,524 Posts
Ahah! I got it to say "this field must be a valid number"
Could you enlighten the rest of us pls?
I am having a similar problem where, when a user tries to register with a taken user name, but gets no error message, people will be so confused, indeed all error messages are not working in that snippet now. I do have lots of notes to guide people, but this particular one will cause some frustration i am sure.
-
☆ A M B ☆
- 24,524 Posts
We are talking about FormIt here. As far as I know, it doesn't do any checking for usernames. You are probably thinking of the Login package's Register snippet. That I don't know about.
Ah, my mistake, I didn't realize.