Giter Site home page Giter Site logo

vldr's Introduction

vldr

vldr is a JavaScript-less configuration jQuery validator plugin.

It doesn't required any JavaScript code to make it run.

This is the first draft.

Usage

In required field use "vldr-required" class. Works on

  • input[type=text]
  • input[type=checkbox] - Make checked required)
  • input[type=radio] - (Made checked required for a radio in a name group)
  • select
  • textarea

Use the "data-vldr-required-msg" attribute to set up the error message.

In inputs with a required pattern use the "vldr-pattern". Works on:

  • input[type=text]

Set the JavaScript RegEx on the "data-vldr-pattern" attribute. And the "data-vldr-pattern-msg" attribute to set the error message.

Finally is no button is classified with "vldr-submit" all the forms will be validated. In case you use the "vldr-submit" class on a button only the parent's form will be validate

Dependencies

  • jQuery 1.5
  • HTML5 doctype to avoid validation issue

TODO

  • Examples
  • Doc
  • Testing Cross-Browser
  • Allow configuration

vldr's People

Contributors

p4bl1t0 avatar fpfarina avatar

Watchers

 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.