We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My Code:
// Controller class UserController { async store ({ request }) { return { success: true } } } // Route Route .post('/registration', 'UserController.store') .validator('UserRegistration') // Validator class UserRegistration { get rules () { return { email: 'required|email' } } get sanitizationRules () { // sanitize data before validation return { email: 'normalize_email' } } get formatter () { return 'jsonapi' } }
Insomnia:
> POST /registration HTTP/1.1 > Host: localhost:3333 > User-Agent: insomnia/5.14.3 > Accept: application/json > Content-Type: application/x-www-form-urlencoded > Content-Length: 29 | email=sample.user%40gmail.com < HTTP/1.1 400 Bad Request < Content-Type: application/json; charset=utf-8 < Content-Length: 2 < Date: Fri, 16 Feb 2018 23:46:36 GMT < Connection: keep-alive
Issue: If I remove
get formatter () { return 'jsonapi' }
I will receive 200. If I include the above, I receive 400.
The text was updated successfully, but these errors were encountered:
The formatter property returns the wrong value. Check the docs for upgrade guide https://adonisjs.com/docs/4.1/upgrade-guide#_formatters
Sorry, something went wrong.
My bad 💃 .
Thank you for responding :D.
Closing.
No branches or pull requests
My Code:
Insomnia:
Issue:
If I remove
I will receive 200. If I include the above, I receive 400.
The text was updated successfully, but these errors were encountered: