Currently, only the List and Number validation rules are supported when using Workbook.ToDocument();
It happens when the type of validation is text or custom
for example:
If I saved :
"validation": {
"type": "reject",
"comparerType": "custom",
"dataType": "custom",
"from": "AND(LEN(A2)<3)",
"showButton": true,
"allowNulls": true
}
I get back:
"validation": {
"type": "reject",
"comparerType": "equalTo",
"dataType": "number",
"from": "=AND(LEN(A2)<3)",
"to": "\"=\"",
"allowNulls": true
}
It happens also when the comparer type is text - it saves it as a number
Also when I use the create validator with your UI and choose a custom formula it can't be saved because the compare type is null. As a result, I must define manually the custom validator