-
Based on this thread #1312 the required() validator is enabled by default. is there any way to disabled that validator? For example in my post request is there some kind of way to write notRequired(): export default class PostValidator {
public schema = schema.create({
my_date: schema.date({}, [
rules.notRequired() // or something like that
// rules.required() <- Even If I don't use this, the validator still applies the required() method
])
}) |
Beta Was this translation helpful? Give feedback.
Answered by
dajpes
Jul 26, 2020
Replies: 1 comment
-
Fixed, I just have to read the docs: https://preview.adonisjs.com/guides/validator/usage#marking-fields-as-optional |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dajpes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed,
I just have to read the docs:
https://preview.adonisjs.com/guides/validator/usage#marking-fields-as-optional