Skip to content
Discussion options

You must be logged in to vote

please kindly send sometimes with the doc before posting an issue.

https://react-hook-form.com/api/useform/formstate

// errors is coming form formState,
const { register, handleSubmit, errors, getValues, setError,setValue,
  clearErrors, formState, reset, control } = useForm({
  defaultValues: {
    email: '[email protected]',
    password: 'secret'
  }
});

Follow the example in this section:
https://react-hook-form.com/get-started#ReactNative

 <Controller 
  name="email"
  rules={{ required: {value:true,message:"Email harus diisi" }}}
  control={control}
  render={props => <Input 
    label='Username/email : ' name="email" autoCapitalize="none" 
    error={!!email.error}
    errorText={email.e…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@galih56
Comment options

@bluebill1049
Comment options

@galih56
Comment options

@Moshyfawn
Comment options

@Moshyfawn
Comment options

Answer selected by galih56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #8177 on April 13, 2022 05:55.