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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Form Validation


Go to End


1029 Views

Avatar
Chipie

Community Member, 16 Posts

9 December 2011 at 3:21am

Hi all, I am trying to add some further validation to my registration form. I am using the memberprofiles module.
I found this tutorial on SSbits, http://www.ssbits.com/tutorials/2009/using-jquery-for-form-validation/, and it asks users to remove Silverstripes built in JS validator by finding the following function:

class ContactPage_Controller extends Page_controller{
function init() {
parent::init();
Validator::set_javascript_validation_handler('none'); }

But it doesnt tell you which file this code is in?

I have followed the rest of the tutorial and added the code to my page.php, however it doesnt seem to be working.

I think its because I have to turn off the silverstripe JS validator?
Anyone had this problem before? Or know where I can find the function?