1

I have a web app built with Java / Spring MVC / JSP / Bootstrap / jQuery.

It has some forms and I need to implement some field value validation rules.

I'll need to do basic checks for mandatory/optional, min length, max length, can't contain spaces, must be only digits, and so on. In the future, I'll likely need validate date format, phone number format, and so on.

I can write something from scratch, but before I do I thought I'd ask ...

Is there a commonly used library out there for this sort of thing?

AndySummers2020
  • 411
  • 1
  • 6
  • 14
  • 1
    Have you checked [this answer](https://stackoverflow.com/questions/12146298/spring-mvc-how-to-perform-validation) here? – Nowhere Man Jun 15 '20 at 19:18
  • Thanks, I take a look. – AndySummers2020 Jun 15 '20 at 19:19
  • @AlexRudenko Spring Validator looks interesting, but I'll have to be able to change the validation properties at run time (validation rules will be different depending on the type of data being edited in my generic form), not sure if Spring Validator will work for me. I'll keep reading more of that posting though. – AndySummers2020 Jun 15 '20 at 19:22

0 Answers0