Skip to content
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

Multiple image validation with height.min and width.min is broken #1717

Closed
timomitt2610 opened this issue Sep 22, 2016 · 2 comments
Closed

Comments

@timomitt2610
Copy link

timomitt2610 commented Sep 22, 2016

I used your demo site

I changed the ngf-validate field to the following: {size: { max: '50MB' }, height: { min: 768 }, width: { min: 1500} } and set ngf-multiple to true.

  1. If I chose all the correct pictures (that pass the validation), then everything worked fine
  2. If I chose 2 correct pictures and 1 incorrect, then it only uploaded 1 correct picture and showed 1 picture with error, but 1 picture got lost in the process (not in $files or $invalidFiles). It should upload 2 correct pictures and show 1 with errors.
  3. If I chose 2 correct pictures and 2 incorrect, then it did not upload any of the pictures and showed 2 pictrues with errors, meaning that 2 pictures got lost in the process (not in $files or $invalidFiles). It should upload 2 correct pictures and show 2 with errors.

To conclude, it uploads only n images that pass the validation, where n = validated images length - invalidated images length. But this kind of behaviour exists only if I use width and height rules together in ngf-validate and it disappears when I remove width or height rules from ngf-validate.

edit: there seems to be no issue, when using height.max and width.max together

@timomitt2610 timomitt2610 changed the title Image validation with height and width broken Multiple image validation with height.min and width.min is broken Sep 22, 2016
@danialfarid
Copy link
Owner

Fixed at 12.2.10

@timomitt2610
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants