unlockha / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
1 stars 0 forks source link

Field type is not validated if a record or bean class is not set #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
A mapping file such as the following, should still validate the 'fileDate' 
field in the 'header' record is a valid date in MMddyyyy format (even though 
the header record is not returned from BeanWriter because the 'class' attribute 
is not set).

  <stream name="stream4" format="csv">
    <record name="header" minOccurs="1" maxOccurs="1">
      <field name="fileDate" type="date" format="MMddyyyy" />
      <field name="fileName" />
    </record>
    <record name="record" class="map">
      <field name="field1" />
      <field name="field2" />
    </record>
  </stream>

This has likely been a defect in all previous versions.

Original issue reported on code.google.com by kevin.s...@gmail.com on 16 Sep 2011 at 9:40

GoogleCodeExporter commented 8 years ago
Similar behavior is observed if ignore="true"

Original comment by kevin.s...@gmail.com on 17 Sep 2011 at 3:47

GoogleCodeExporter commented 8 years ago
Fixed for 1.2.1.

Original comment by kevin.s...@gmail.com on 17 Sep 2011 at 2:36

GoogleCodeExporter commented 8 years ago

Original comment by kevin.s...@gmail.com on 21 Sep 2011 at 10:53