Philip Hallstrom wrote:
>> How do you guys feel about client side validation? Do you think its
>> necessary or a waste of time?
> 
> All depends on the app for me.  You obviously have to validate server
> side regardless, but if there are things you can do client side to
> make it easier for the user, go for it.  I'm thinking things like
> "username can only be lowercase alphanumeric"... if you can stop
> someone from filling out an entire form only to complain they ignored
> your rule... that's a nice feature.

Yes.  And you don't need client-side validation for that, just a note. 
Sounds obvious, but you'd be amazed how often I see it omitted.

> 
> There's a plugin out there that will take your AR model validations
> and convert them into javascript validations in your form.  Can't
> recall the name, but that might simplify things for you.

I'll check that out.  That was actually something I liked about 
ColdFusion.

> 
> Now... my personal pet peeve is forms that demand that phone numbers
> be in a certain format... I happen to like 555.555.5555 and that
> happens to be what my browser remembers.  Drives me nuts when it
> whines that I have to use 555-555-5555.  Just strip the non numbers
> and format it yourself!  *grumble* *grumble*
> 
> The same is true for credit card numbers...  point being if you can
> clean it up server side and still know what you've got, do it :)
> 

Agreed 100%.  Don't make the user do things that the app should be smart 
enough to do itself.

> -philip

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to