fix: error messages dont match validation
This commit is contained in:
parent
b367653e09
commit
17554f2847
1 changed files with 2 additions and 3 deletions
|
|
@ -124,8 +124,7 @@ const Schema = Yup.object()
|
||||||
return message
|
return message
|
||||||
},
|
},
|
||||||
txVelocity: threshold => {
|
txVelocity: threshold => {
|
||||||
const thresholdMessage =
|
const thresholdMessage = 'Transactions must be greater than 0'
|
||||||
'Transactions must be greater than or equal to 0'
|
|
||||||
const thresholdDaysMessage = 'Days must be greater than 0'
|
const thresholdDaysMessage = 'Days must be greater than 0'
|
||||||
let message = ''
|
let message = ''
|
||||||
if (threshold.threshold <= 0) message = message.concat(thresholdMessage)
|
if (threshold.threshold <= 0) message = message.concat(thresholdMessage)
|
||||||
|
|
@ -136,7 +135,7 @@ const Schema = Yup.object()
|
||||||
console.log(message)
|
console.log(message)
|
||||||
return message
|
return message
|
||||||
},
|
},
|
||||||
consecutiveDays: threshold => 'Days must be greater than or equal to 0'
|
consecutiveDays: threshold => 'Days must be greater than 0'
|
||||||
}
|
}
|
||||||
const thresholdValidator = {
|
const thresholdValidator = {
|
||||||
txAmount: threshold => threshold.threshold >= 0,
|
txAmount: threshold => threshold.threshold >= 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue