Giter VIP home page Giter VIP logo

jquery.validate's Introduction

jquery.validate

A simpler, more elegant form validation plugin.

I wrote this plugin for a specific project I was working on. I needed a very simple form validator and wanted one that actually looked good. Plus I wanted to use HTML5's built-in attributes for marking up validation requirements.

This only supports the specific use-cases that I needed, but I plan on completing more when I have time. You're welcome to make contributions as well.

Supported Features

No special markup is required in declaring your form.

<form> ... </form>

You can also pass special options in the form tag like so:

<form data-validate-position="right"> ... </form>

Will cause the validation bubbles for this form to appear to the right of the input field, instead of the default below. Valid values are above, below, and right.

In terms of input fields, supported options are required, minlength, maxlength, and partial pattern support.

<input type="text" required minlength="2" maxlength="32" pattern="alpha">

At this time, pattern only supports the value of alpha, to restrict the input to be alphabetical characters. Custom regex patterns and other pre-made regexes will be supported later.

Also, if the type is set to email, it will validate the formatting of the input to ensure it's a legal email address.

It's important to note, this plugin automatically adds novalidate to the form tag, to prevent modern browsers from checking the form.

jquery.validate's People

Stargazers

Jennifer Culp avatar Uros Gruber avatar

Watchers

 avatar James Cloos avatar InnoTek Services avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.