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

sometimes|nullable #68

Open
vardash0131 opened this issue Oct 23, 2020 · 2 comments
Open

sometimes|nullable #68

vardash0131 opened this issue Oct 23, 2020 · 2 comments

Comments

@vardash0131
Copy link
Contributor

I think this is from the framework as such because if you put in model $rules = []; it works but in validator::make method doesnt exist

amg this happend cause images are optional uploads but need a especific dimensions, when you try to save the images without "sometimes" validation the images becomes in required image , maybe i was doing it bad :D

without sometimes
Screenshot_128

with sometimes

Screenshot_129

well i Hard-code the trait doing this ** jajaja

Screenshot_130

@mihaitatomir
Copy link

Hi! Nice plugin.

Maybe you want to change in the traits/ComponentUtils in method OnUpload, when get the model validation rules, do an explode by | and then add the rules in the $validationRules array. Because it throws an error by the Validator rule "nullable|image|max:4000" method not found. In my case i wanted to change the avatar of the RaiLab.User.

@daftspunk
Copy link
Member

Hi @mihaitatomir

We would accept a pull requests with this suggestion.

Best regards

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

3 participants