Skip to content

ValidatorDate always accepts date format overflow #111

@fugerit79

Description

@fugerit79

Imagine we have a date format configured like this :

	<validator id="testDateValidator" type="org.fugerit.java.core.validator.ValidatorDate">
		<entry key="dateFormat">dd/MM/yyyy</entry>
	</validator>

It will correcly parse input like

01/03/2021

But will not fail in case of overflow too , for instance :

01/03/2021AAA

We want to add an option to make the parsing strict, for instance :

	<validator id="testDateValidatorStrict" type="org.fugerit.java.core.validator.ValidatorDate">
		<entry key="dateFormat">dd/MM/yyyy</entry>
		<entry key="strict">true</entry>
	</validator>
```xml

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions