fix: set up labels for YUP default messages
This commit is contained in:
parent
a88c5f2a9a
commit
d4ae1c3ff2
1 changed files with 8 additions and 18 deletions
|
|
@ -80,15 +80,10 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => {
|
||||||
type: 'cassette 1',
|
type: 'cassette 1',
|
||||||
schema: Yup.object().shape({
|
schema: Yup.object().shape({
|
||||||
cassette1Count: Yup.number()
|
cassette1Count: Yup.number()
|
||||||
.required('Bill count is a required.')
|
.label('Bill count')
|
||||||
.min(
|
.required()
|
||||||
0,
|
.min(0)
|
||||||
({ min }) => `Bill count must be greater than or equal to ${min}.`
|
.max(CASHBOX_DEFAULT_CAPACITY)
|
||||||
)
|
|
||||||
.max(
|
|
||||||
CASHBOX_DEFAULT_CAPACITY,
|
|
||||||
({ max }) => `Bill count must be less than or equal to ${max}.`
|
|
||||||
)
|
|
||||||
}),
|
}),
|
||||||
cashoutRequired: true
|
cashoutRequired: true
|
||||||
},
|
},
|
||||||
|
|
@ -96,15 +91,10 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => {
|
||||||
type: 'cassette 2',
|
type: 'cassette 2',
|
||||||
schema: Yup.object().shape({
|
schema: Yup.object().shape({
|
||||||
cassette2Count: Yup.number()
|
cassette2Count: Yup.number()
|
||||||
.required('Bill count is a required.')
|
.label('Bill count')
|
||||||
.min(
|
.required()
|
||||||
0,
|
.min(0)
|
||||||
({ min }) => `Bill count must be greater than or equal to ${min}.`
|
.max(CASHBOX_DEFAULT_CAPACITY)
|
||||||
)
|
|
||||||
.max(
|
|
||||||
CASHBOX_DEFAULT_CAPACITY,
|
|
||||||
({ max }) => `Bill count must be less than or equal to ${max}.`
|
|
||||||
)
|
|
||||||
}),
|
}),
|
||||||
cashoutRequired: true
|
cashoutRequired: true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue