improve err message on boost
This commit is contained in:
parent
b68fadc63d
commit
18a15b4e60
|
@ -8,7 +8,7 @@ import { NAME_QUERY } from '../fragments/users'
|
||||||
export function AdvPostSchema (client) {
|
export function AdvPostSchema (client) {
|
||||||
return {
|
return {
|
||||||
boost: Yup.number().typeError('must be a number')
|
boost: Yup.number().typeError('must be a number')
|
||||||
.min(BOOST_MIN, `must be at least ${BOOST_MIN}`).integer('must be whole'),
|
.min(BOOST_MIN, `must be blank or at least ${BOOST_MIN}`).integer('must be whole'),
|
||||||
forward: Yup.string()
|
forward: Yup.string()
|
||||||
.test({
|
.test({
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
@ -34,13 +34,13 @@ export default function AdvPostForm () {
|
||||||
body={
|
body={
|
||||||
<>
|
<>
|
||||||
<Input
|
<Input
|
||||||
label={<>boost <small className='text-muted ml-2'>optional</small></>}
|
label={<>boost</>}
|
||||||
name='boost'
|
name='boost'
|
||||||
hint={<span className='text-muted'>ranks posts higher temporarily based on the amount</span>}
|
hint={<span className='text-muted'>ranks posts higher temporarily based on the amount</span>}
|
||||||
append={<InputGroup.Text className='text-monospace'>sats</InputGroup.Text>}
|
append={<InputGroup.Text className='text-monospace'>sats</InputGroup.Text>}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
label={<>forward sats to <small className='text-muted ml-2'>optional</small></>}
|
label={<>forward sats to</>}
|
||||||
name='forward'
|
name='forward'
|
||||||
hint={<span className='text-muted'>100% of sats will be sent to this user</span>}
|
hint={<span className='text-muted'>100% of sats will be sent to this user</span>}
|
||||||
prepend=<InputGroup.Text>@</InputGroup.Text>
|
prepend=<InputGroup.Text>@</InputGroup.Text>
|
||||||
|
|
Loading…
Reference in New Issue