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