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

Validation of JSON Fields #16

Closed
tjmartin69 opened this issue Oct 3, 2018 · 5 comments
Closed

Validation of JSON Fields #16

tjmartin69 opened this issue Oct 3, 2018 · 5 comments
Labels
help wanted Extra attention is needed request New feature or request

Comments

@tjmartin69
Copy link

Hi,

Seems like the JSON fields are not validated. Would be really great to support this.

Is this something you are planning to implement in the future?

Many Thanks,
Tom

@beliolfa beliolfa added the request New feature or request label Oct 4, 2018
@idragon81
Copy link

Really need this.

@beliolfa
Copy link
Contributor

beliolfa commented Oct 8, 2018

@idragon81 new issue opened here #19

@64robots 64robots deleted a comment from idragon81 Oct 8, 2018
@beliolfa beliolfa added the help wanted Extra attention is needed label Oct 8, 2018
@beliolfa
Copy link
Contributor

beliolfa commented Oct 8, 2018

These subfields are not included in the request and dont belong to the main resource therefore they cant be validated. Any suggestion on this? maybe make partial support for certain rules and do a frontend validation?

@tjmartin69
Copy link
Author

tjmartin69 commented Oct 8, 2018

@disitec Maybe frontend validation on some rules would work. Let me have a dig into how validation is handled inside Nova I might be able to get a concept working.

On a side note would it be possible to send the data as an array instead of json_encoded e.g.
config[message]=test instead of {"message":"test"} this might make the validation work easier. And would stop us having to do

            $request->merge([
                $requestAttribute => json_decode($request[$requestAttribute], true)
            ]);

@beliolfa
Copy link
Contributor

Added support via PR #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants