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
Reading a FixedLengh File I'd like to test that a field must have a non empty value (mandatory).
For this field I've used settings like this:
[FieldFixedLength(1)]
[FieldTrim(TrimMode.Both)]
[FieldNotEmpty]
public string myField1;
But lines where this field is set to "blank" (" ") are not discarded
Could be an issue about the [FieldNotEmpty] attribute or am I using this in the wrong way?
In case of using the AfterRead event, when I test the field it is possible only so set e.SkipThisRecord = true;
or could be possible to transform this situation in an Error inside the engine.Errors collection?
The text was updated successfully, but these errors were encountered:
I ran into a similar issue, and it seems this is how it works. I ended up adding my own validator to determine whether a blank or empty string is allowed.
Reading a FixedLengh File I'd like to test that a field must have a non empty value (mandatory).
For this field I've used settings like this:
But lines where this field is set to "blank" (" ") are not discarded
Could be an issue about the [FieldNotEmpty] attribute or am I using this in the wrong way?
In case of using the AfterRead event, when I test the field it is possible only so set
e.SkipThisRecord = true;
or could be possible to transform this situation in an Error inside the engine.Errors collection?
The text was updated successfully, but these errors were encountered: