Write a JavaScript function to validate a text-field on a form that is to hold an email address. Now when writing this J

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a JavaScript function to validate a text-field on a form that is to hold an email address. Now when writing this J

Post by answerhappygod »

Write a JavaScript function to validate a text-field on a form that is to hold an email address.
Now when writing this JavaScript function bear in mind that you won't be able to fully validate
it unless you manage to interrogate the server in which it's supposed to reside. This is almost
impossible, so the validation should check that the contents of the text-field only looks like a
valid email address.
email addresses look like the following
[email protected]
[email protected]
[email protected]
etc
Submit a html file with a form containing an email text-field, and the JavaScript code that called
to validate the text-field when the form is submitted. (so I can easily test it).
Write a JavaScript function to validate a text field on a form which is to contain an integer, eg 2,
4567, 87612 etc ... without using any built functions like IsNaN an so fourth. If the text field
contains a valid number then the JavaScript function can return "true", otherwise it returns
"false" as well as displaying a popup error message.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply