Merge pull request #151 from Safelite/feature/CSR-254

CSR-254: remove unused validation rules preventing form from valid status
This commit is contained in:
AdamCaouetteSafelite 2022-01-19 08:15:36 -05:00 committed by GitHub
commit 6fdd1ab0c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,7 +266,7 @@ export default {
.min(17, errorMessages.demo3) .min(17, errorMessages.demo3)
.max(17, errorMessages.demo3) .max(17, errorMessages.demo3)
.matches('^[^IOQ]+$', errorMessages.demo3), .matches('^[^IOQ]+$', errorMessages.demo3),
demo4: Yup.string().matches('^[0-9]*$', errorMessages.demo4), // demo4: Yup.string().matches('^[0-9]*$', errorMessages.demo4),
demo5: Yup.array().required(errorMessages.demo5).min(1, errorMessages.demo5), demo5: Yup.array().required(errorMessages.demo5).min(1, errorMessages.demo5),
demo6: Yup.string() demo6: Yup.string()
.when('demo5', function (demo5, schema, value) { .when('demo5', function (demo5, schema, value) {
@ -282,10 +282,10 @@ export default {
}), }),
demoX: Yup.string().notRequired(), demoX: Yup.string().notRequired(),
// PASSWORD EXAMPLE, NOT BEING USED NOW // PASSWORD EXAMPLE, NOT BEING USED NOW
password: Yup.string().min(6).required(), // password: Yup.string().min(6).required(),
passwordConfirmation: Yup.string() // passwordConfirmation: Yup.string()
.required() // .required()
.oneOf([Yup.ref("password")], "Passwords do not match"), // .oneOf([Yup.ref("password")], "Passwords do not match"),
}).test('repair-replace-conflict', }).test('repair-replace-conflict',
null, // need to pass null as error message so it won't get added to list of errors null, // need to pass null as error message so it won't get added to list of errors
function(value) { function(value) {