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
latest
When i validate using VineJs and one of the keys is a enum but can be null it's give me de following error:
TypeError: Cannot convert undefined or null to object at Function.values (<anonymous>) at _VineNativeEnum
with the following json:
{ "object": "my_object", "entry": [ { "id": "0", "time": 1723073445, "changes": [ { "field": "any_field", "value": { "event": "APPROVED", "message_template_id": 12345678, "message_template_name": "my_message_template", "message_template_language": "pt-BR", "reason": null } } ] } ] }
The Complete vine schema:
export default vine.compile( vine.object({ object: vine.string(), entry: vine.array( vine.object({ id: vine.string(), time: vine.number(), changes: vine.array( vine.object({ field: vine.string(), value: vine.object({ event: vine.enum(OTHER_ENUM), message_template_id: vine.number(), message_template_name: vine.string(), message_template_language: vine.string(), reason: vine.enum(MY_ENUM).nullable(), }), }) ), }) ), }) )
Where the erro occurs reason: vine.enum(MY_ENUM).nullable(),
reason: vine.enum(MY_ENUM).nullable(),
No response
The text was updated successfully, but these errors were encountered:
Can you please share the complete Vine schema
Sorry, something went wrong.
Sure, i update the first comment with the Vine Schema
No branches or pull requests
Package version
latest
Describe the bug
When i validate using VineJs and one of the keys is a enum but can be null it's give me de following error:
TypeError: Cannot convert undefined or null to object at Function.values (<anonymous>) at _VineNativeEnum
with the following json:
The Complete vine schema:
Where the erro occurs
reason: vine.enum(MY_ENUM).nullable(),
Reproduction repo
No response
The text was updated successfully, but these errors were encountered: