You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, basically, i'm using bootstrap and i want to set the error messages format so i can match my website pattern.
In order to do this, i need to get the Element ( as the observable element or elements ) being validated and also the error message i set.
An example:
var viewModelUser = ko.validatedObservable({
email: ko.observable().extend({ required: { message: 'Please supply your email address.' } }),
if (viewModelUser.isValid() == false) {
var errors = viewModelUser.errors();
for (var j = 0; j < errors.length; j++) {
// HERE I NEED TO GET THE ELEMENT AND THE ERROR MESSAGE ITSELF
}
return false;
}
How can i do this?
Thanks in advange!
The text was updated successfully, but these errors were encountered:
Hi Guys!
So, basically, i'm using bootstrap and i want to set the error messages format so i can match my website pattern.
In order to do this, i need to get the Element ( as the observable element or elements ) being validated and also the error message i set.
An example:
var viewModelUser = ko.validatedObservable({
email: ko.observable().extend({ required: { message: 'Please supply your email address.' } }),
if (viewModelUser.isValid() == false) {
var errors = viewModelUser.errors();
for (var j = 0; j < errors.length; j++) {
// HERE I NEED TO GET THE ELEMENT AND THE ERROR MESSAGE ITSELF
}
return false;
}
How can i do this?
Thanks in advange!
The text was updated successfully, but these errors were encountered: