OpenWGA 7.10 - TMLScript reference
WGAObject:
WGA.Validate
Description |
This subobject offers comfortable functions to validate data in common ways, prominently in WebTML form validations. The methods of this object that have no parameters are to be used within WebTML field validation expressions (<tml:input> attribute validation) and automatically test the current field. |
||||||||||
Retrieval | Global object WGA.Validate | ||||||||||
Allowed in script types |
|
||||||||||
Properties and methods |
|
||||||||||
Examples |
Some examples of using WGA.Validate inside WebTML form validation functions for common cases: Name: <tml:input name="name" validation="WGA.Validate.isFilled()" message="Please enter a name"/> <br> Date of birth: <tml:input name="dateofbirth" type="date" validationdivider="~" validation="WGA.Validate.isFilled() ~ WGA.Validate.isDateInPast()" message="Please enter a date of birth ~ Your date of birth must be in the past"/> <br> Company: <tml:input name="company" type="select" relationtype="protected" validation="WGA.Validate.isFilled()" message="Please specify a company"/> |