-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
styled signup scene #84
Conversation
<Text style={styles.errorMessage}> | ||
{fields.password.errorMessage && fields.password.errorMessage} | ||
</Text> | ||
</View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My challenge to you: write a component that encapsulates
<View style={styles.errorContainer}>
<Text style={styles.errorMessage}>
{fields.password.errorMessage && fields.password.errorMessage}
</Text>
</View>
And works w/ Gandalf. Maybe name it something like ValidatedText
.
validators: ['required'], | ||
errorPropName: 'error', | ||
onChangeHandler: 'onChangeText', | ||
props: { | ||
placeholder: 'Password', | ||
style: styles.login |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're going to want to add the secureTextEntry: true
prop here. This will make it behave like a password input.
validators: ['email'], | ||
errorPropName: 'error', | ||
onChangeHandler: 'onChangeText', | ||
props: { | ||
placeholder: 'Email', | ||
style: styles.login |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use keyboardType: 'email-address'
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also use autoCapitalize: false
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just make sure you add those props to the ValidatedText
component
closes #82