You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValidationError: '"value" cannot rename children [fooBar] because override is disabled and target "fooBar" exists' (type: 'object.rename.regex.override')
{ fooBar: 'a' }
ValidationError: '"fooBar" is required' (type: 'any.required')
The validation is successful, when FooBar field is passed, but fails every time, when I pass object with field fooBar.
What did you expect ?
I want to define a schema, that accepts fields case insensitively, e.g. I want to generate { fooBar: 'a' } output from every of the following inputs without failure:
{ fooBar: 'a' }
{ FooBar: 'a' }
{ FoOBaR: 'a' }
The text was updated successfully, but these errors were encountered:
I tested it today with the current state of master branch, and it now works as expected. I think it is fixed in #1770, so I'm waiting for the next release to come out.
As a temporary fix you can use the alias setting in current version, but be careful that it'll result in potentially having duplicate properties with different casing.
Context
What are you trying to achieve or the steps to reproduce ?
Which result you had ?
The validation is successful, when
FooBar
field is passed, but fails every time, when I pass object with fieldfooBar
.What did you expect ?
I want to define a schema, that accepts fields case insensitively, e.g. I want to generate
{ fooBar: 'a' }
output from every of the following inputs without failure:{ fooBar: 'a' }
{ FooBar: 'a' }
{ FoOBaR: 'a' }
The text was updated successfully, but these errors were encountered: