Hemi JavaScript Framework
Hemi.data.validator.definitions
Description
Data Validator Definitions define validation patterns for verifying form field and custom control (e.g.: Hemi.ui.wideselect) input matches expected patterns and allowable characters. Patterns may be chained together and defined with a meaningful description for end users.
Class Index
static Hemi.data.validator.definitions.service
version 3.1.0
Static implementation of hemi.data.validator.definitions.serviceImpl
Hemi.data.validator.definitions.service
version 3.1.0
This service defines validation patterns for use by the Hemi Data Form Service.
Index
Method Index
- public addNewPattern: Creates a new implementation definition. An implementation definition maps a node name to a specified constructor.
Methods
addNewPattern
Creates a new implementation definition. An implementation definition maps a node name to a specified constructor.
Syntax
object = addNewPattern(
sId, sType, sComp, sMatch, sReplace, bNull, sError, aIncludes
)
Parameters
- sId as String : Validation pattern id.
- sType as String : The type of validation: bool, replace, or none.
- sComp as String (optional): For validation type of bool, the comparison value may be "true" or "false".
- sMatch as String : Regular expression to use to match the input value.
- sReplace as String (optional): Replacement value to use for the matched expression.
- bNull as boolean (optional): Bit indicating whether null values are allowed.
- sError as String (optional): Error message to describe the expected pattern. e.g.: Phone numbers should be numbers and hyphens only.
- aIncludes as array (optional): Array of pattern ids that should be executed prior to this pattern. e.g.: The trim-ends pattern has a comparison of none and includes the trim-start and trim-end patterns.
Returns
object as object: A new internal space definition.
[ Hemi JavaScript Framework - Stephen W. Cote, 2002 - 2009. ]