Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

jquery validate failing...

Go to End

3 Posts   797 Views


Community Member, 244 Posts

29 September 2011 at 9:01pm


I've followed the details here:
but my form is being submitted no matter what I choose...

unfortunately the default validation doesn't seem to work with tick boxes, so i'm having to cancel that and use a custom script

the page is live here:

can anyone see anything that might be stopping my jquery validation working?



Forum Moderator, 1391 Posts

29 September 2011 at 11:16pm

I think you should use the fieldname to define rules and messages, instead of the the field id:

	rules: {
		Form_SignupForm_Email: {    required: true,       email: true 	        	}, 
		Form_SignupForm_LastName: {  required: true   },


	rules: {
		Email: {    required: true,       email: true 	        	}, 
		LastName: {  required: true   },

Hope that helps...


Community Member, 244 Posts

29 September 2011 at 11:38pm

Thanks, I'll give that a try tomorrow - late now!

in the mean time I went back to the standard validation script and added this


// If checked
if (jQuery("#Form_SignupForm_TC").is(":checked")){

this crudely gets around the tick box issue by setting a value to a hidden field. silverstripe vaidlates the hidden field instead of the tickbox. the problem is that when you submit the form, you get the error messages. when you tick the box to correct the issue, the error message isn't being removed - it must be getting triggered by onkeydown or somthing...