Validating required fields
Form fields can be displayed in a very flexible grid.This is great if you want to save some space in large forms or make it visually easier to scan a form. You can define the width of each field like this: fields: first Name: label: First Name type: text width: 1/2 last Name: label: Last Name type: text width: 1/2 street: label: Street type: text zip: label: ZIP type: number width: 1/4 location: label: Location type: text width: 3/4 parameter.Custom icons can help to make your forms easier to scan. You can find a list of all available icons here: To define your custom icon, just search for the icon you'd like to add to a field and use its css selector without the fields: street: label: de: Straße en: Street type: text placeholder: de: Bitte geben Sie einen Straßennamen ein… You can trigger validators automatically by associating them with an event.In this example, you use the Zip Code Validator and Phone Number Validator validators to validate the ZIP code and phone number input to a data model.In this example, you use the predefined Zip Code Validator and Phone Number Validator to validate user information as the user enters it.This method returns an event object containing the results of the validation that is an instance of the Validation Result Event class.For more information on using the return result, see Handling the return value of the validate() method.
In general, you are free to name your fields like you want to, but there are two limitations: ).The Date Validator can examine a single field that contains a date, or multiple fields that together make up a date.When you validate an object that contains multiple properties that are set independently, you often cannot use events to automatically trigger the validator because no single field contains all of the information required to perform the validation.For more information on the Date Validator and Credit Card Validator, see Using standard validators.You can invoke multiple validators programmatically from a single function.