brilliant-orangeB
Refine2y ago
3 replies
brilliant-orange

I would like to display a required message at the bottom of the form input when the input is not ent

<FormControl>
                <FormLabel>{isPay ? '추가 지급할 적립금' : '회수할 적립금'}</FormLabel>
                <OutlinedInput
                  type="number"
                  id="amount"
                  error={!!errors.amount}
                  {...register('amount', {
                    required: t('errors.required.field', {
                      field: 'amount',
                    }),
                    valueAsNumber: true,
                  })}
                  style={{ height: '40px' }}
                />
              </FormControl>
Was this page helpful?