Open GoogleCodeExporter opened 8 years ago
Validation rules only apply during unmarshalling. There are plenty of other
bean validation frameworks for validating objects. So the described logic is
by design, and delivers the best possible performance.
That said, I will investigate creating a system/beanio property setting that
would enable validation on marshalling.
Thanks,
Kevin
Original comment by kevin.s...@gmail.com
on 17 Dec 2013 at 3:18
I'm also interested and applying validation rules during marshalling. Since my
validation rules (field maxlength, required, etc) are already defined in my
mapping file, it doesn't make much sense to duplicate these rules in another
bean validation framework.
Original comment by patrick....@gmail.com
on 27 Aug 2014 at 2:58
Snapshot 3.0.0 JAR attached. Note that 3.x requires JDK 1.7 or higher.
This feature is disabled by default, but can be enabled using the following in
beanio.properties:
org.beanio.validateOnMarshal=true
This will cause all marshalling to throw an InvalidBeanException if a
marshalled field does not meet the following configured validation rules:
- required / nillable
- minimum field length
- maximum field length
- regex
Original comment by kevin.s...@gmail.com
on 8 Sep 2014 at 3:13
Attachments:
Issue 116 has been merged into this issue.
Original comment by kevin.s...@gmail.com
on 8 Sep 2014 at 3:21
Original issue reported on code.google.com by
nzipsi@gmail.com
on 16 Dec 2013 at 4:47