Jump to:

23378 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Javascript Validation

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

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

Page: 1
Go to End
Author Topic: 2285 Views
  • animasola
    Avatar
    Community Member
    121 Posts

    Javascript Validation Link to this post

    What library does the form validation of Silverstripe use? I am having problems with most of my effects since they use MooTools and it has conflicts with some libraries. I relieved the conflict between mootools and jquery by using the jQuery.noConflict(); function and it allowed my effects to work while viewing the forum or event calendar. But whenever I try logging in or registering, they stop working. My mind tells me it's because of the validator.js that creates the conflict with mootools.

    Has anyone encountered the same problem? Is anyone using mootols as well and having trouble? Can I just remove the form validation or create my own from mootools? Where can I find the validation javascript file?

    Thanks!

  • tobych
    Avatar
    Community Member
    97 Posts

    Re: Javascript Validation Link to this post

    The Javascript is included in sapphire/Forms/Validator.php (currently uses Prototype).

    Toby

  • Krato
    Avatar
    Community Member
    7 Posts

    Re: Javascript Validation Link to this post

    To disable javascript validation use:

    Validator::set_javascript_validation_handler("none");

    This could be called from _config.php to disable site-wide javascript validation, or from ContentController::init() to disable form validation just for that template.

    Regards

    2285 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.