This isn't built into MR (that I know of) but I've been using the
jQuery Validation plugin lately. It's super simple, you just add
classes to the elements you want to validate.

i.e. <input type="text" class="required email"/>

I know that is a little against the whole DRY principal but it works
well.



On Oct 29, 2:16 pm, jsmorris <[EMAIL PROTECTED]> wrote:
> In my new view, I have
>
> <?brail
>   items = FormHelper.CreateCheckboxList("project.strategies",
> strategies, { @value: 'Id', @text: 'Name' })
>   for item in items:
>     output items.Item()
>     output item.Name
>  ?>
>
> to create a list of checkboxes.
>
> I want to enforce that the user has to select at least one of the
> checkboxes from the list.
>
> I saw in the FormHelper javascript, there is validation for validate-
> one-required, so I tried to add that as a class on each checkbox, but
> as you tab through the checkboxes, I get the validation error message
> repeated under my list of checkboxes, like so.
>
> Please select one of the above options.
> Please select one of the above options.
> Please select one of the above options.
> Please select one of the above options.
>
> I also have my Project model with marked with
> ValidateCollectionNotEmpty.
>
> What is the best way to get client side validation so that at least
> one checkbox in the list is selected?
>
> Thanks,
> Jason
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to