More React Native Examples #5626
Answered
by
bluebill1049
mattslight
asked this question in
Ideas
-
Love this project! Super helpful and once I understand the concepts it does save me time. Can I suggest that the React Native example using the <Controller
name="email"
control={control}
rules={{ /* *** This rules syntax was what took me a while to figure out *** */
required: { value: true, message: "Email is required" },
pattern: { value: /.+@.+\..+/, message: "Check email format" },
}}
render={({ field: { onChange, value } }) => {
return (
<Input
onChangeText={(text) => onChange(text)}
label="Email address"
error={errors?.email}
errorText={errors?.email?.message}
/>
);
}}
/> |
Beta Was this translation helpful? Give feedback.
Answered by
bluebill1049
Jun 16, 2021
Replies: 1 comment 1 reply
-
awesome feedback. will include that in the react native example for validation. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mattslight
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awesome feedback. will include that in the react native example for validation.