support validationErrorMessage in rjsf enum w/ burnettk (#311)

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
jasquat 2023-06-07 12:55:32 -04:00 committed by GitHub
parent bba28f1b9e
commit 49950b1639
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# TODO: clean up this service for a clear distinction between it and the process_instance_service
# where this points to the pi service
import decimal
import uuid
import json
import logging
import os
@ -277,6 +278,7 @@ class CustomBpmnScriptEngine(PythonScriptEngine): # type: ignore
"sum": sum,
"time": time,
"timedelta": timedelta,
"uuid": uuid,
}
use_restricted_script_engine = True

View File

@ -53,8 +53,11 @@ function SelectWidget({
let errorMessageForField = null;
if (rawErrors && rawErrors.length > 0) {
invalid = true;
// errorMessageForField = `${labelToUse.replace(/\*$/, '')} ${rawErrors[0]}`;
errorMessageForField = rawErrors[0];
if ('validationErrorMessage' in schema) {
errorMessageForField = (schema as any).validationErrorMessage;
} else {
errorMessageForField = rawErrors[0];
}
}
// ok. so in safari, the select widget showed the first option, whereas in chrome it forced you to select an option.