troubleshooting Question

Fix validation so dates without trailing text fail validation

Avatar of GessWurker
GessWurker asked on
JavaScript
3 Comments1 Solution63 ViewsLast Modified:
I need to prevent "orphan dates" being submitted in form. The attached form is prevents bad dates from being submitted, but it does not block entries that contain ONLY a date. All lines should have a valid date followed by some text.

Example: A line that only has a date, like this:

·12/12/2019

Should not pass validation.

These lines are good:

·10/23/2019 - test
·10/24/2019 - testing again

Here is test content (note, the bullet character must be included):

·10/23/2019 - test
·10/24/2019 - testing again
·10/01/2019 - here's another test
·12/03/2019 - sort this one too
·12/1/2019 - bad date should be caught
·12/12/2019
·12/x/2019

By the time all validation is done, all acceptable entries (i.e., valid date followed by text) should be accepted and properly sorted.

Who can help with this validation issue?

Thanks!
sort_test.htm
ASKER CERTIFIED SOLUTION
ste5an
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros