mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-13 07:01:38 -04:00
BS3: js validation errors.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
function displayFormErrors(data){
|
function displayFormErrors(data){
|
||||||
if( data.errors != undefined ){
|
if(data.errors != undefined ){
|
||||||
$.each( data.errors, function( field, errorMsg) {
|
$.each(data.errors, function(field, errorMsg) {
|
||||||
$("#"+field).parents(".control-group").addClass("error");
|
$("#"+field).closest(".form-group").addClass("has-error");
|
||||||
$("#"+field).siblings(".help-block").html(errorMsg);
|
$("#"+field).siblings(".help-block").html(errorMsg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user