Feedback from code reviews

This commit is contained in:
2022-07-26 16:38:21 -05:00
parent 4e2af0f573
commit a365b8e017
2 changed files with 10 additions and 23 deletions

View File

@ -93,27 +93,6 @@ class DynamicFormUtils
}
return (null);
}
public static getFormDataForUploadForm(fieldName: string, fieldLabel: string, isRequired: boolean = true)
{
const dynamicFormFields: any = {};
const formValidations: any = {};
dynamicFormFields[fieldName] = {
name: fieldName,
label: fieldLabel,
isRequired: isRequired,
type: "file",
// todo invalidMsg: "Zipcode is not valid (e.g. 70000).",
};
if (isRequired)
{
formValidations[fieldName] = Yup.string().required(`${fieldLabel} is required.`);
}
return {dynamicFormFields, formValidations};
}
}
export default DynamicFormUtils;