CE-1727 Updates to processes rendering block-widgets, to get up to compatible with the android app

This commit is contained in:
2024-11-04 08:48:46 -06:00
parent 4fd50936ea
commit 81efb7e18d
10 changed files with 444 additions and 98 deletions

View File

@ -130,18 +130,11 @@ class DynamicFormUtils
if (effectivelyIsRequired)
{
if (field.possibleValueSourceName)
{
////////////////////////////////////////////////////////////////////////////////////////////
// the "nullable(true)" here doesn't mean that you're allowed to set the field to null... //
// rather, it's more like "null is how empty will be treated" or some-such... //
////////////////////////////////////////////////////////////////////////////////////////////
return (Yup.string().required(`${field.label ?? "This field"} is required.`).nullable(true));
}
else
{
return (Yup.string().required(`${field.label ?? "This field"} is required.`));
}
////////////////////////////////////////////////////////////////////////////////////////////
// the "nullable(true)" here doesn't mean that you're allowed to set the field to null... //
// rather, it's more like "null is how empty will be treated" or some-such... //
////////////////////////////////////////////////////////////////////////////////////////////
return (Yup.string().required(`${field.label ?? "This field"} is required.`).nullable(true));
}
return (null);
}