mirror of
				https://github.com/fspc/BikeShed-1.git
				synced 2025-10-31 00:45:35 -04:00 
			
		
		
		
	BS3: js validation errors.
This commit is contained in:
		
							parent
							
								
									c58c039e3c
								
							
						
					
					
						commit
						3c521eba15
					
				| @ -1,7 +1,7 @@ | ||||
| function displayFormErrors(data){ | ||||
|   if( data.errors != undefined ){ | ||||
|     $.each( data.errors, function( field, errorMsg) { | ||||
|       $("#"+field).parents(".control-group").addClass("error"); | ||||
|   if(data.errors != undefined ){ | ||||
|     $.each(data.errors, function(field, errorMsg) { | ||||
|       $("#"+field).closest(".form-group").addClass("has-error"); | ||||
|       $("#"+field).siblings(".help-block").html(errorMsg); | ||||
|     }); | ||||
|   } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user