new Validator()
- Source:
Methods
-
addValidator(el) → {undefined}
-
Add a validator to the current set of validators.
Parameters:
Name Type Description eltype - Source:
Returns:
- Type
- undefined
-
bindAllEventsToValidator(validator)
-
Applies the defined events to the specified validator.
Parameters:
Name Type Description validatorjQuery - Source:
-
bindEvent(origEvtName, gEvtName)
-
Bind an event to trigger Greppy validator events.
Parameters:
Name Type Description origEvtNameString Name of the event to be bound.
gEvtNameString May be 'gValidationInvalid' or 'gValidationUpdate'.
- Source:
-
bindEventToValidator(validator, origEvtName, gEvtName)
-
This binds an element's event to a specified greppy Validator event.
Parameters:
Name Type Description validatorjQuery origEvtNameString gEvtNameString - Source:
-
getMark(el) → {jQuery}
-
Gets the element which should be marked if an error occurs.
Parameters:
Name Type Description eljQuery The validator.
- Source:
Returns:
- Type
- jQuery
-
hasActiveMsg(el) → {Boolean}
-
Returns wether the passed element has an active message.
Parameters:
Name Type Description eljQuery - Source:
Returns:
- Type
- Boolean
-
init()
-
Initializes greppy validators.
- Source:
-
markInvalid(el)
-
Marks the provided element as invalid.
Parameters:
Name Type Description elObject - Source:
-
removeInvalidMark(el)
-
Removes an invalid mark from the provided element.
Parameters:
Name Type Description elObject - Source:
-
removeMsg(el, fast)
-
Removes the msg-element of a provided mark element, if there's any.
Parameters:
Name Type Description elObject The mark element
fastBoolean No fading out; fast removing.
- Source:
-
showMsg(el)
-
Shows the validation message of a provided element.
Parameters:
Name Type Description eltype - Source:
-
validate(el)
-
Validates an element.
Parameters:
Name Type Description elObject The element to validate.
- Source: