feat: introduce CustomAutocomplete with variables

This commit is contained in:
Ali BARIN
2023-05-25 13:40:27 +00:00
parent 42842e7aec
commit f2dc2f5530
47 changed files with 1441 additions and 468 deletions

View File

@@ -41,6 +41,7 @@ import {
Header,
Wrapper,
} from './style';
import isEmpty from 'helpers/isEmpty';
type FlowStepProps = {
collapsed?: boolean;
@@ -75,7 +76,13 @@ function generateValidationSchema(substeps: ISubstep[]) {
if (required) {
substepArgumentValidations[key] = substepArgumentValidations[
key
].required(`${key} is required.`);
]
.required(`${key} is required.`)
.test(
'empty-check',
`${key} must be not empty`,
(value: any) => !isEmpty(value),
);
}
// if the field depends on another field, add the dependsOn required validation