Skip to content

Conversation

@TheSalarKhan
Copy link

These changes have helped me! Some code has been added to make sure that the file objects are not returned when even one validation fails. This was something I was expecting to be there as a developer. So, I was working on a case where I have to prevent the user from uploading more than 4 documents, I was happy to find the maxnum attribute I though that It won't let the user select more than 4 docs, or at the very least will return with an empty model, that was not the case though. But after these changes, it works as expected, if the user selects any files that violate the validation conditions it will return with an [] in case of multiselect and with null in case of single file select.

Muhammad Salar Khan added 3 commits October 22, 2017 15:17
@TheSalarKhan TheSalarKhan changed the title Used validations on the model data. [RFC: Do not merge yet] Used validations on the model data. Oct 22, 2017
@TheSalarKhan TheSalarKhan changed the title [RFC: Do not merge yet] Used validations on the model data. [Do not merge yet] Used validations on the model data. Oct 22, 2017
@TheSalarKhan TheSalarKhan changed the title [Do not merge yet] Used validations on the model data. [Do not merge yet] Used validations on the model data. Request for comments Oct 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant