Currently, I have this
"slip": {
"type": "string",
"title": "Slip",
'pattern': '^P(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$',
"description": "ISO 8601 Duration that allows the start of each run to be as much as the Duration later than their ideal scheduled time. Default is 5 minutes (PT5M)",
"default": "PT5M",
},
If i want to add a key such as x-invalid-message: "'%s' is not a valid ISO 8601 duration.", the frontend ignores the validation entirely. It's probably because AJV rejects any unknown keywords in strict mode, breaking all validation.
Perhaps, we'll have to update json-forms-esm and do something like
import { createAjv } from "@jsonforms/core";
const handleDefaultsAjv = createAjv({ useDefaults: true });
handleDefaultsAjv.addKeyword({ keyword: "x-invalid-message" });
Doing this, would then allow us to show better invalid messages to the user.
Currently, in the above case, the UI shows

Currently, I have this
If i want to add a key such as
x-invalid-message: "'%s' is not a valid ISO 8601 duration.", the frontend ignores the validation entirely. It's probably because AJV rejects any unknown keywords in strict mode, breaking all validation.Perhaps, we'll have to update json-forms-esm and do something like
Doing this, would then allow us to show better invalid messages to the user.
Currently, in the above case, the UI shows