For example annotate a field for apply some kind o...
# announcements
f
For example annotate a field for apply some kind of data validation, it’s a good thing?
a
You can use reflections.
s
Its highly dependant on the context. You will have to use reflection which may be slow. Data validation might be better achieved by setters.
f
Thanks, I start to write a library for model validation using Annotation and Reflection, my fear is the performance of reflection process, but is an experiment
a
As far as I remember, Spring boot also uses Annotations for validation. It might be a good reference to look into...
t
It’s quite standard on the Java server side