Use an async arrow function for webui rules

Co-authored-by: Hornwitser <github@hornwitser.no>
This commit is contained in:
Cooldude2606andHornwitser authored and GitHub committed 2026-03-04 14:34:09 +00:00
1 parent b2daf26e6c
commit 687a384fe4
1 file changed
+2 -7
@@ -392,15 +392,10 @@ function computeTreeData(
tooltip={def.description}
valuePropName={def.type === "boolean" ? "checked" : "value"}
rules={[{
validator: function(_, fieldValue) {
validator: async (_, fieldValue) => {
if (def.extendedValidation) {
try {
def.extendedValidation(fieldValue, config);
} catch (err: any) {
return Promise.reject(err);
}
def.extendedValidation(fieldValue, config);
}
return Promise.resolve();
},
}]}
>