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
The rules are not getting applied in Yup. I know the examples show oneOf being used to conditionally type a property, but I was wondering if there was a way to use it like this.
Another question I have is - when I define a schema like below:
When I don't include the likes field in the validation data, a validation error is raised that the array field has to have the minimum elements. I have not included the property name in the array of required elements, so I would expect that the validation should only fail if the element is not an empty list? Can you please explain what I am doing wrong in this case? Thanks.
The text was updated successfully, but these errors were encountered:
@abbasegbeyemi thanks for raising this issue. A fix has been made and published (json-schema-yup-transformer@1.6.6-beta.2). Validation only executes when field and field value are present.
Thank you so much for this library. It is absolutely amazing.
I have a schema where at least one field is required. The JSON schema looks like this as an example.
The rules are not getting applied in Yup. I know the examples show
oneOf
being used to conditionally type a property, but I was wondering if there was a way to use it like this.Another question I have is - when I define a schema like below:
When I don't include the likes field in the validation data, a validation error is raised that the array field has to have the minimum elements. I have not included the property name in the array of required elements, so I would expect that the validation should only fail if the element is not an empty list? Can you please explain what I am doing wrong in this case? Thanks.
The text was updated successfully, but these errors were encountered: