Relative Content

Tag Archive for javascripthtmlvalidation

How can I validate an expiry date in Javascript?

I’m a beginner to HTML, Javascript, and coding in general. For an assessment, I’m required to create a form with HTML, and validate it with a Javascript file. If an inputted answer isn’t valid, it should return false. For a credit card, a user is required to input an expiry date, and if the date has already passed, it should return false. Though despite this, no matter how much I troubleshoot, it always returns true with no errors. Any help would be appreciated!

Validate fake names

Is there a way to test the form input against a list of invalid/fake names? Like: