.uiValidate()
Categories: UI
.uiValidate( [ options ] )
Subclass: ep
Inherit: (Subclass: ep) .uiInput()
Plugin: ep.ui.validate
Description: Add validate handling for input elements.
The .uiValidate()
method add validate handling to a input elements.
The .uiValidate()
method is using the ep.validate module for validation, all available types of
ep.validate type are supported. Have a look at the additional options, some option are only available for
special validation types.
-
Apply .uiValidate() to input element named email.
HTML:
<form>
<input type="text" name="email" />
</form>
Code:
ep(':input[name=email]')
.uiValidate({
required: true,
type: 'email'
});
-
type
version added: 6.11.0
An available validation type from ep.validate[ type ].
Default: basic
-
valid
version added: 6.11.0
A boolean indication wether the input is valid on startup.
Default: true
-
required
version added: 6.11.0
A boolean indication wether the value is required.
Default: false
-
min
version added: 6.11.0
A minimum valid number.
-
max
version added: 6.11.0
A maximum valid number.
-
minlength
version added: 6.11.0
A minimum number of chars.
-
maxlength
version added: 6.11.0
A maximum number of chars.
-
format
version added: 6.11.0
A date/number formatter [look at the jQuery.i18n plugin].
-
region
version added: 6.11.0
An i18n region [look at the jQuery.i18n plugin].
-
strict
version added: 6.11.0
A boolean indication wether to validate in strict mode.
Default: false
-
accept
version added: 6.11.0
A list of accepted mimetypes or mimetype groups.
Default: */*