@@ -66,15 +66,15 @@ var LoginForm = React.createClass({
6666 maxLength : 12 ,
6767 editable : ! this . props . form . isFetching ,
6868 hasError : this . props . form . fields . usernameHasError ,
69- error : 'Must have 6-12 characters and/or numbers'
69+ error : this . props . form . fields . usernameErrorMsg
7070 } ;
7171
7272 let email = {
7373 label : 'Email' ,
7474 keyboardType : 'email-address' ,
7575 editable : ! this . props . form . isFetching ,
7676 hasError : this . props . form . fields . emailHasError ,
77- error : 'Please enter valid email'
77+ error : this . props . form . fields . emailErrorMsg
7878 } ;
7979
8080 let secureTextEntry = ! this . props . form . fields . showPassword ;
@@ -85,7 +85,7 @@ var LoginForm = React.createClass({
8585 secureTextEntry : secureTextEntry ,
8686 editable : ! this . props . form . isFetching ,
8787 hasError : this . props . form . fields . passwordHasError ,
88- error : 'Must have 6-12 characters with at least 1 number and 1 special character'
88+ error : this . props . form . fields . passwordErrorMsg
8989 } ;
9090
9191 let passwordAgain = {
@@ -94,7 +94,7 @@ var LoginForm = React.createClass({
9494 maxLength : 12 ,
9595 editable : ! this . props . form . isFetching ,
9696 hasError : this . props . form . fields . passwordAgainHasError ,
97- error : 'Passwords must match'
97+ error : this . props . form . fields . passwordAgainErrorMsg
9898 } ;
9999
100100 let loginForm ;
@@ -111,7 +111,9 @@ var LoginForm = React.createClass({
111111 passwordAgain : t . String
112112 } ) ;
113113 options . fields [ 'username' ] = username ;
114+ options . fields [ 'username' ] . autoCapitalize = 'none' ;
114115 options . fields [ 'email' ] = email ;
116+ options . fields [ 'email' ] . autoCapitalize = 'none' ;
115117 options . fields [ 'password' ] = password ;
116118 options . fields [ 'passwordAgain' ] = passwordAgain ;
117119 break ;
@@ -126,6 +128,7 @@ var LoginForm = React.createClass({
126128 password : t . String
127129 } ) ;
128130 options . fields [ 'username' ] = username ;
131+ options . fields [ 'username' ] . autoCapitalize = 'none' ;
129132 options . fields [ 'password' ] = password ;
130133 break ;
131134
@@ -138,6 +141,7 @@ var LoginForm = React.createClass({
138141 email : t . String
139142 } ) ;
140143 options . fields [ 'email' ] = email ;
144+ options . fields [ 'email' ] . autoCapitalize = 'none' ;
141145 break ;
142146 } //switch
143147
@@ -146,12 +150,12 @@ var LoginForm = React.createClass({
146150 * returns the Form component with the correct structures
147151 */
148152 return (
149- < Form ref = "form"
150- type = { loginForm }
151- options = { options }
152- value = { this . props . value }
153- onChange = { this . props . onChange }
154- />
153+ < Form ref = "form"
154+ type = { loginForm }
155+ options = { options }
156+ value = { this . props . value }
157+ onChange = { this . props . onChange }
158+ />
155159
156160 ) ;
157161 }
0 commit comments