charCount.EXCLUDES
- static Array
List of characters excluded from counting. By defalut it has just the newline char, the most common char for textareas (according to developers).
It may be modified according to yours needs (just remember it's static) or use the optional
It may be modified according to yours needs (just remember it's static) or use the optional
excludes
parameter invoking the validation method.
errors
- static Array<JSON>
An Array of errors. Each error is a JSON in the form.
object: <DOM>, // the invalid input DOM Object label: <String>, // the label forobject
as returned bygetLabelFor
type: <String>, // a string representing the name of the validation ('required', 'maxLen', ...) message: <String> // the string containing the error message
file
- static object
Validator extensions for file extensions.
Sample usage: file_input: ["file=pdf,txt"]
Sample usage: file_input: ["file=pdf,txt"]
iban_it
- static object
Validator extensions for IBAN (International Bank Account Number) for italian bank accounts (BBAN of 23 characters).
Definition is here
Definition is here
options
- static JSON
Default options are:
errorClass: null, // the style class to apply in case of invalid value // default function invoked in case of at least one invalid value. // It get an <Array<JSON>> and this options as arguments callback: function(errors, options) { jsbeans.Validator.manageErrors(errors, options); }, propagate: true, // if false validation will stop at first error focusOnFirst: true, // if true focus will be applied in first invalid input extraFunctions: null, // a list of functions for extra validation, useful for custom validation locale: "en" // default locale
passwordStrength
- static object
Validator extensions for password strength.
It tests for length (minimum 6 characters), case (both cases), numbers and characters mix, two sets of other characters (.+-_! and |$&()?'^[]{}#,;:)
Each of them has a weight:
It tests for length (minimum 6 characters), case (both cases), numbers and characters mix, two sets of other characters (.+-_! and |$&()?'^[]{}#,;:)
Each of them has a weight:
length: 0.3 case: 0.25 mix: 0.25 a set of other chars: 0.1 each --------------------------------- of course the sum is 1 A strong password has at least 0.6. This means the password has to check at least 3 of provided controls.
wordCount.EXCLUDES
- static Array
List of words and marks excluded from counting. It has punctation marks, brackets, arithmetics marks, ...
It may be modified according to yours needs (just remember it's static) or use the optional
It may be modified according to yours needs (just remember it's static) or use the optional
excludes
parameter invoking the validation method.
See here and here for a list of HTML/javascript entities.