added validation with jquery-validate on signup page
This commit is contained in:
		| @@ -7,6 +7,17 @@ body { | |||||||
|   text-align: center; |   text-align: center; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .help-block.error, | ||||||
|  | label.error { | ||||||
|  |   color: #e74c3c; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .form-control.error, | ||||||
|  | .form-control.error:focus { | ||||||
|  |   border: 2px solid #e74c3c; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| .btn-label { | .btn-label { | ||||||
|   position: relative; |   position: relative; | ||||||
|   left: -12px; |   left: -12px; | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								public/js/lib/jquery.validate.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								public/js/lib/jquery.validate.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3
									
								
								public/js/main.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								public/js/main.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | /* global $ */ | ||||||
|  |  | ||||||
|  | $('form').validate(); | ||||||
| @@ -43,5 +43,7 @@ html | |||||||
|                 a(href='/logout') Logout |                 a(href='/logout') Logout | ||||||
|   .container |   .container | ||||||
|     block content |     block content | ||||||
|  |  | ||||||
|   script(src='/js/lib/jquery.js') |   script(src='/js/lib/jquery.js') | ||||||
|   script(src='/js/lib/jquery.validate.js') |   script(src='/js/lib/jquery.validate.js') | ||||||
|  |   script(src='/js/main.js') | ||||||
|   | |||||||
| @@ -7,19 +7,19 @@ block content | |||||||
|       .form-group |       .form-group | ||||||
|         .row |         .row | ||||||
|           .col-xs-6.col-sm-6.col-md-6 |           .col-xs-6.col-sm-6.col-md-6 | ||||||
|             label(for='firstName') First Name |             label.control-label(for='firstName') First Name | ||||||
|             input.form-control(type='text', name='firstName', id='firstName', placeholder='First Name', autofocus='', required='') |             input.form-control(type='text', name='firstName', id='firstName', placeholder='First Name', autofocus='', required='') | ||||||
|           .col-xs-6.col-sm-6.col-md-6 |           .col-xs-6.col-sm-6.col-md-6 | ||||||
|             label(for='lastName') Last Name |             label.control-label(for='lastName') Last Name | ||||||
|             input.form-control(type='text', name='lastName', id='lastName', placeholder='Last Name', required='') |             input.form-control(type='text', name='lastName', id='lastName', placeholder='Last Name', required='') | ||||||
|       .form-group |       .form-group | ||||||
|         label(for='email') Email |         label.control-label(for='email') Email | ||||||
|         input.form-control(type='email', name='email', id='email', placeholder='Email', required='') |         input.form-control(type='email', name='email', id='email', placeholder='Email', required='') | ||||||
|       .form-group |       .form-group | ||||||
|         label(for='password') Password |         label.control-label(for='password') Password | ||||||
|         input.form-control(type='password', name='password', id='password', placeholder='Password', required='') |         input.form-control(type='password', name='password', id='password', placeholder='Password', required='') | ||||||
|       .form-group |       .form-group | ||||||
|         label(for='confirmPassword') Confirm Password |         label.control-label(for='confirmPassword') Confirm Password | ||||||
|         input.form-control(type='password', id='confirmPassword', placeholder='Confirm Password', required='') |         input.form-control(type='password', id='confirmPassword', placeholder='Confirm Password', required='') | ||||||
|       .form-group |       .form-group | ||||||
|         button.btn.btn.btn-primary(type='submit') Signup |         button.btn.btn.btn-primary(type='submit') Signup | ||||||
| @@ -28,5 +28,3 @@ block content | |||||||
|       .alert.alert-danger |       .alert.alert-danger | ||||||
|         for message in messages |         for message in messages | ||||||
|           div= message |           div= message | ||||||
|     script |  | ||||||
|       $('form').validate(); |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user