-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for isRequired (mandatoriness) check #52
Comments
Required-ness check would have to be added in FasterXML/jackson-databind#230 As things are, checks are only implemented for one special case: Creator properties. So if you define constructor or factory method like:
verification is made. Otherwise, if only passing via setters or assigned to fields, no check is made. Challenge in this case is simply complexity of adding explicit state and tracking for properties; added overhead, and avoiding the overhead if no checks are needed. So it is a large undertaking. Perhaps it could be implemented for 3.0: this is something many users have requested. |
Since this is covered by issue I linked to, will close this issue: I think support needs to go in databind and not dataformat modules. So closing issue here as a duplicate. |
Background:
We're in need for a fast and feature-rich CSV Parser and have zeroed-in on using jackson-dataformats-text library. We will be passing the 'Schema' object as an input (which is populated from a schema-file we receive from an upstream system). For each field, we will provide a 'Name' and 'Data Type'. Additionally, we would like to provide an input 'isRequired' so if a field is marked isRequired=true but there is no data in that field in the incoming CSV file, we need to raise an exception.
Requirement:
So far, we could not find support for 'isRequired' check. Please can you advise if this is already present or if not, could this be taken as a new requirement to add the feature in an upcoming release ?
Thanks.
The text was updated successfully, but these errors were encountered: