You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing as wontfix as it's easier to have validation in a PropertyType or Property implementation that discards the value of the YML if it's invalid so that ConfigMe uses the default, e.g. if we only allowed positive numbers a type impl could easily call reader#getInt and then still return null from BaseProperty#getFromReader if the value is <= 0, for example.
I think this keeps everything clearer and doesn't add an additional layer of complexity that one must keep in mind.
I'm not sure if I rather had bean properties in mind while writing this but there also I think writing some sort of validator class by hand and calling it is sufficient.
Proposition:
Allow other annotations to define certain constraints, e.g. only positive numbers. Maybe we can have some implementations already for some of http://docs.oracle.com/javaee/6/api/javax/validation/constraints/package-summary.html
The text was updated successfully, but these errors were encountered: