[Feature Request] Multiple validation rules required
Thanks for making this module. I am curious, if there's a way to implement this:
- ratio : (resolutionMinWidth / resolutionMinHeight) === (image width / image height)
- min Dimensions: image's width > resolutionMinWidth && image's height > resolutionMinHeight
I need both of these validations together. Thanks in Advance
Hi @sanishkr,
Currently, the lib just supports only one type of validation on init. So maybe we should make resolutionType accept string[] type that could support your case. Btw we still do not have the plan to do this now, I would appreciate it if you can do a pull request for it. Welcome~
Thank you, hope you doing well!
Thanks for the quick reply. Will make a PR and let you know.
@vutoan266 I have added 2 separate PRs for 2 possible solutions. #115 and #116 Please have a look at them and make naming changes if required as per your convenience.
Thanks
Hi @sanishkr,
Thanks for your enthusiasm and nice try, good job bro!!
I took a look 2 pull requests and prefer resolutionType can accept an array of enums: https://github.com/vutoan266/react-images-uploading/pull/115
Your implementation is good. Btw I have commented on it for some suggestions, can discuss more if you have any concerns.
I will merge it when the code looks better (update document also), mark you as a contributor.
Thank you so much again :D
Hi @vutoan266,
I have updated the readme as you asked. Also, I do not see any comments on the PR #115
Cool!! You can see my comments under Conversation tab of pull request page.
@vutoan266 https://github.com/vutoan266/react-images-uploading/pull/115#issuecomment-1014689946