Web Component: j-Validate
j-Validate
The component contains the same source-code as the j-Validation
component.
- jComponent
v19|v20
Configuration:
if
{String}
can contain JS condition for evaluationvalue
{Object}
contains entire modelpath
{String}
contains changed path- must return boolean
selector
{String}
jQuery selector for disabling (default:button[name="submit"]
)delay
{Number}
a timeout for validation (default:100
)flags
{String}
flags for better validation, can containvisible,hidden,enabled,disabled
componentsenabled
validate all components which are enabledinput
,textarea
orselect
elementsdisabled
validate all components which are disabledinput
,textarea
orselect
elementshidden
validate all components which are hiddenvisible
validate all components which are visible
track
{String}
can contain paths divided by the comma, and manual changing of each path (viaSET()
,UPD()
,INC()
, etc. methods) will evaluate the validationvalidonly
{Boolean}
skipsdirty
state (default:false
)- NEW
changes
{Boolean}
enables comparing changes only between the input model and the form (default:false
) - NEW
strictchanges
{Boolean}
enables strict comparing changes (otherwisenull
,false
,empty strings
and0
values will be removed), default:false
- NEW
exec
{String}
optional, a link to thefunction(data)
that is executed when the model is validated and changed - NEW
output
{String}
optional, a link to thefunction(valid)
or path
Good to know:
- component adds
ui-validate-ok
class to the element if the model is valid - component adds
ui-validate-no
class to the element if the model is invalid - component adds
ui-validate-modified
class to the element if the model is changed
Author
- Peter Širka petersirka@gmail.com
- License
Created
13. november 2021
Updated
10. august 2024
jComponent library
19 | 20
Version
v1
License
https://www.totaljs.com/license/
Responsive
No
Author
Peter Širka
Email
petersirka@gmail.com