1, XForm flexible client data verification function
Data verification generally includes three types:
Completeness: The user must populate all required fields. Sometimes, whether a field must fill the value dependent on another field. For example, the credit card number is only required when the user pays with credit card. Data Types: The number must be a number, the date must be the date, and push it according to the class. Rationality: The phone number should only contain numbers, or may also contain short-term and parentheses related to the area code. Postal codes must have 5 numbers, but also with short-term and "plus four" numbers.
XForm provides type binding mechanism for data nodes in Model, such as:
XForms: Model>
2. Forced input
... xsd: schema>
3, forced input with conditions
If only the user chooses the credit card payment, the credit card is required:
... xsd: Schema>
If the "unit price" field is not allowed to modify
... Order>
5, calculate field
Such as "total price" = quantity * unit price: ... order> XForms: instance>
6, other properties of the Bind element
Constraint: This property sets any constraints. For example, developers can limit a certain node than another. Maxoccurs and MinoCCURS: These two attributes determine how many items can occur in the form. P3PTYPE: This property binds a node to the information in the user's private work file.