* update to show exact err msg with custom event name * updated tests for validateCustomEventName --------- Co-authored-by: Keith Williams <[email protected]> Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
5 files changed
+24
-22
No files matched your search
@@ -53,8 +53,12 @@ const CustomEventTypeModalForm: FC<CustomEventTypeModalFormProps> = (props) => {
|
||||
type="text"
|
||||
placeholder={placeHolder_}
|
||||
{...register("customEventName", {
|
||||
validate: (value) =>
|
||||
validateCustomEventName(value, t("invalid_event_name_variables"), event.bookingFields),
|
||||
validate: (value) => {
|
||||
const validationResult = validateCustomEventName(value, event.bookingFields);
|
||||
return typeof validationResult === "string"
|
||||
? t("invalid_event_name_variables", { item: validationResult })
|
||||
: validationResult;
|
||||
},
|
||||
})}
|
||||
className="mb-0"
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user