management-sdk
management-sdk copied to clipboard
Update Simple Field doesn't work for validation.
Hi,
I've noticed that updating a validation on field using updateSimpleField doesn't work. When I try to do that I'm getting an error:
Error: field validations not supported for undefined at extractFieldValidations
From what I was able to find it was happen because updateSimpleField use extractFieldValidations which require a type to work:
But the typescript type definition for the updated model does not allow us to pass it. (This is understandable, we can't pass the type because we can't update it.) :
Temporary workaround is to pass a type in updateSimpleField and disable warning from typescript. The type must be the same as the field already exists in: