Implementation Approach | Pros | Cons |
---|
Java Util Package | - More consistent use of code from this library across CPS
- Easier to write individual unit tests for.
- Can throw more specific error message if validation doesn't match.
| |
Spring/OpenApi keyword | | - Inconsistent use of one validation library across code.
- Harder to write individual unit tests for.
|
Apache Commons Validator | - Similar to Java Util Library.
- Slightly less production code in validating regex
| - Adding an extra dependency for no further advantageslightly less production code.
|