having some issue in getting text append into specific label
here is my html code
<label for="password">
Password <small>required</small>
<input type="password" name="password" placeholder="Enter password" required pattern="[a-zA-Z]+"/>
<small class="error">Password is required</small>
<small class="server-error"></small>
</label>
now when my server validation return as false with the msg, i would like to append that message into the <small class="server-error"></small>
here is my ajax part
$.post('./login.php', $(this).serialize(), function(msg){
// working = false;
// $('#submit').val('Login');
if(msg.status){
window.location.href = "testt.php";
}
else {
$.each(msg.errors,function(k,v){
/// NOT SURE WHAT TO HAVE HERE TO GET THE SPECIFIC LABEL
});
//$('#testForm').html("fail");
}
}, 'json');