-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)Validator
Description
Description
I'd like to propose a few steps to improve the validation constraints:
- Deprecate empty strings (
"") currently happily passing in string constraints (e.g.Email) - Deprecate non string values in
NotBlank/Blankand 'whitespaced' strings passing (" ") - Consider
NotEmpty/Emptyas the currentNotBlank/Blankconstraints- https://docs.jboss.org/hibernate/stable/beanvalidation/api/javax/validation/constraints/NotEmpty.html
- I dont think we should add these (but favor specific constraints) as
emptyin PHP is different as described above (ints, bools, etc). Not sure we should follow either one :) thus possible confusion
If this happens we'd do simply
@Email@NotNull @Email@NotNull @Length(min=3) @NotBlank@NotNull @NotBlank@Type(array) @Count(3)
Thoughts?
apfelbox, Taluu, noniagriconomie, debreczeniandras, sstok and 2 more
Metadata
Metadata
Assignees
Labels
RFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)Validator