MonoRail - Server-side vs. Client-side Form Validation

Posted by Justin on Stack Overflow See other posts from Stack Overflow or by Justin
Published on 2010-05-28T18:12:46Z Indexed on 2010/05/30 22:22 UTC
Read the original article Hit count: 219

Filed under:

Hey,

I'm using MonoRail and was wondering how it decides when to use client-side vs. server-side validation? In my model class I have [ValidateNonEmpty] on two properties, one is a textbox, the other is a dropdown. The textbox triggers client-side validation on form submission, if I leave the dropdown empty though it posts back to the server and returns back the validation error from server-side. Is there a way to get the dropdown to trigger client-side validation? Also it's odd because after the postback, it clears what I had entered in the dropdown but maintains the state of the textbox (viewstate anyone??)

Thanks, Justin

© Stack Overflow or respective owner

Related posts about monorail