Skip to content
mil.js - A library to interact with input fields
JavaScript
Find file
Latest commit 77537b9 Eytan Anjel validated bower.json
Failed to load latest commit information.
bower_components/jquery added bower_components
src added gitignore
.gitignore validated bower.json
README.md edited readme
bower.json validated bower.json

README.md

mil.js

This is a project to simplify using input fields on forms, that only requires jQuery.

field.js

This file contains the logic for the input fields. You need to instantiate a Field object for every input.

var username = new Field()

The Field constructor takes an object parameter. Here are the things you can pass in the object:

  • jQueryElement - The DOM object that the Field should bind to
  • validations - An array of validation functions
  • message - Message to display on errors
  • subscribers - Array of Fields that subscribes to the validation action of the Field
  • helpTextDom - Help text DOM to display help text
  • helpText - Help text that displays if given a help text DOM
  • doOnValidationChanged - function to execute on validation change
Something went wrong with that request. Please try again.