The input validation happens when a change is done to one of the two text inputs (onChange event).
- by A sw A
Write a JavaScript that has two text input; one for name and one for phone number. It also has two buttons: Reset and Submit.
The name should be in the format: (LastName, FirstName, MiddleInitial.)
The phone number should be in the format (ddd-ddd-dddd)
The input validation happens when a change is done to one of the two text inputs (onChange event).