Unset validation dynamically

Hi @aleksandra_budnik ,

I need help for the following.

Scenario

I was wondering if we can dynamically unset validation value. In my example, the resignedDate field will be mandatory only when the employee status is set to Inactive. However, on changing the employee status dropdown to Temporary Leave or Active, I want to remove the validation from the resignedDate field.

Problem
Once validator is marked as invalid for resignedDate, I can not unset/reset validation. I want to change validator to option when I change the employee status to Active or Temporary Leave

Attempted Solution
I tried to reset validation using setCellMetaObject function to reset validator to undefined, but it I failed.

Request
Can you please suggest? Here’s the example.

Hi @m.saad.yaseen

You can reset a validator after changing the cell type to text as the text cell type doesn’t have any default validator. If you have used a custom validator that you can call instance.setCellMeta(row, col, validator, null)