jQuery validation for form inputs

rss

Posted by steve4ride - Nov 17 ’12 at 12:38

Hi,

I use to work with jQuery validation plugin, but as I have seen in this blog you provide custom validation based on aler() method. Can you include jQuery validation plugin in your tool. It'll be really handy.

  • Anthony (Support)
    Anthony (Support)
    Moderator
    Member for: 10 years 4 months 20 days
    #1 by Anthony (Support) Nov 18 ’12 at 03:53

    Hello, steve4ride.

    You can add jQuery validate script to page, just upload script file to SharePoint library like Styles Library, then open JavaScript window of SharePoint Forms Designer

     

    Put following code to code editor:

     

     

    //add jQuery validate script to page

    var s = document.createElement("script");

    s.type = "text/javascript";

    s.src = "<Link to script>";

    $("head").append(s);

     

     

    Replace <Link to script> with link to uploaded script. After that you can use validation plugin as you use to.

  • schuess
    schuess
    Member
    Member for: 9 years 2 months 6 days
    #2 by schuess Aug 1 ’16 at 10:26

    Is this still a valid method to referrence a external plugin?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 6 months 8 days
    #3 by Dmitry Kozlov Aug 2 ’16 at 05:08

    [#2]: It's better to use HTML-control to reference external scripts.

  • schuess
    schuess
    Member
    Member for: 9 years 2 months 6 days
    #4 by schuess Aug 2 ’16 at 08:32

    [#3]: Can you give an example what you mean by HTML control?

  • schuess
    schuess
    Member
    Member for: 9 years 2 months 6 days
    #5 by schuess Aug 2 ’16 at 02:21

    i guess you are just talking about <script type="" src=""></script>

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 6 months 8 days
    #6 by Dmitry Kozlov Aug 3 ’16 at 08:45

    [#5]: Yes, right.

Displaying 1 to 6 of 6 messages