feat: add error messages to all 3rd party services

This commit is contained in:
Sérgio Salgado 2022-02-11 17:43:46 +00:00
parent 4015e23d34
commit bb17c71cb1
15 changed files with 160 additions and 127 deletions

View file

@ -37,10 +37,12 @@ export default {
],
getValidationSchema: account => {
return Yup.object().shape({
authorizationValue: Yup.string()
authorizationValue: Yup.string('The score threshold must be a string')
.required('The authorization value is required')
.max(100, 'Too long')
.test(secretTest(account?.authorizationValue)),
scoreThreshold: Yup.number()
scoreThreshold: Yup.number('The score threshold must be a number')
.required('A score threshold is required')
.min(1, 'The number should be between 1 and 10')
.max(10, 'The number should be between 1 and 10')
.test(secretTest(account?.scoreThreshold))