Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Warren Buckley 2089 posts 4578 karma points MVP ∞ admin hq c-trib
    Jan 20, 2010 @ 20:46
    Warren Buckley
    0

    Validation Suggestion

    Hiya Tim,
    Great work with this package.

    I am just working with this and have a suggestion to update jQuery.validate to include some custom error messages and for the comment field to require a minimum of 10 characters.

    For example:

    jQuery("form").validate({
                    rules: {
                        comment: {
                            required: true,
                            minlength: 10
                            }
                    },
                    messages: {
                        name: "Please enter your name",
                        email: {
                            required: "Please enter an email address",
                            email: "Please enter a valid email address"
                        },
                        url: "Please enter a valid URL including http://",
                        comment: {
                            required: "Please enter a comment",
                            minlength: "Your comment must be at least 10 characters long"
                        }
                    },
                    submitHandler: function(form) {
                        //Usual code carries on as normal...

     

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jan 21, 2010 @ 11:00
    Tim Geyssens
    0

    Cool, would be a nice update.

  • Warren Buckley 2089 posts 4578 karma points MVP ∞ admin hq c-trib
    Jan 21, 2010 @ 11:23
    Warren Buckley
    0

    Will this be added in tomorrows update where you are fixing the regex email problem?

    Obviously you could use your dictionary item's here as opposed to hard coded text.
    Warren

  • Iulia Maria Jensen 40 posts 71 karma points
    Aug 13, 2013 @ 21:57
    Iulia Maria Jensen
    0

    I would like to ask about this as well. The package is great but not really usable unless it has some validation on...

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies