You want to be sure that your visitors enter data into the HTML fields you have "required" for a valid submission.Below is the Java Script code to perform this basic check to see if a given HTML input is empty or not.
Alert box gives only one button "OK" to select and proceed.
These options can be changed using the Configure API above.
Your generator will interact a lot with the end user.
For example, the date range rule requires a start and an end date in order to begin validation. Group Scope is for reasonably rare cases when you are using the same group validation rule more than once in a single form.
For example, if you were to have two date validators on one form, you would use group scope to allow the library differentiate between the two.
To allow for this flexibility, Yeoman provides a set of user interface element abstractions.
It is your responsibility as an author to only use those abstractions when interacting with your end user.
But with Java Script it’s a lot more straight forward.
You see, Java Script offers not only console logging, but also a simple means by which to display messages and get inputs from the users. First off, let’s start with the easy stuff: displaying messages!
Displaying messages is as simple as using the function is used to get textual or numerical (or both) data from the user.