prevent writing of remote
This commit is contained in:
parent
8713bf178a
commit
154e869b8c
@ -73,10 +73,14 @@ export default function JobForm ({ item, sub }) {
|
|||||||
maxBid: Yup.number('must be number')
|
maxBid: Yup.number('must be number')
|
||||||
.integer('must be whole').min(sub.baseCost, `must be at least ${sub.baseCost}`)
|
.integer('must be whole').min(sub.baseCost, `must be at least ${sub.baseCost}`)
|
||||||
.required('required'),
|
.required('required'),
|
||||||
location: Yup.string().when('remote', {
|
location: Yup.string().test(
|
||||||
is: (value) => !value,
|
'no-remote',
|
||||||
then: Yup.string().required('required').trim()
|
"don't write remote, just check the box",
|
||||||
})
|
v => !v?.match(/\bremote\b/gi))
|
||||||
|
.when('remote', {
|
||||||
|
is: (value) => !value,
|
||||||
|
then: Yup.string().required('required').trim()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const position = data?.auctionPosition
|
const position = data?.auctionPosition
|
||||||
|
Loading…
x
Reference in New Issue
Block a user