'error' class remove on fields when use "is valid" behavior
https://jsfiddle.net/02gfdbx9/
the error class on field should not be remove when we use $('.ui.form').form('is valid');
the error class on field are remove when we use $('.ui.form').form('is valid');
https://jsfiddle.net/02gfdbx9/

2.7.7
Please try $('.ui.form').form('validate form');
Thx @brunotourinho but that's not what I want to do. I want to check (on my code) if there is a error on the form with $('.ui.form').form('is valid') and this behavior must not remove the error class on the field
Oh, I got it... I don't know why 'is valid' kinda resets the form... good question!
I use both funcions...
function btnPostAnchor(sender, event) {
event.preventDefault();
var f = $('.ui.form').form('is valid')
$('.ui.form').form("validate form");
if (f === true) {
var formData = $('form').serialize();
postAjax(sender, formData);
}
};
Use determine isValid instead, which does what you expect.
Okay, so either. I doesn't know this behavior ! It doesn't seem to be documented or ...
don't @lubber-de think that behavior 'is valid' reset the form is not correct ?
Yes, it unfortunately is.
I searched the source and found that while seeking for the reasons of your found behavior. 馃槈
We might add an option to the " is valid" behavior how to behave with the error class display. It's currently hardcoded as it is and the "determine isValid" currently does it the other way around.
The quick solution is to use the undocumented (probably because of supposed internal usage only), behavior.
Fixed by #1615
See your adjusted jsfiddle here https://jsfiddle.net/lubber/1978duwp/4/
Most helpful comment
Yes, it unfortunately is.
I searched the source and found that while seeking for the reasons of your found behavior. 馃槈
We might add an option to the " is valid" behavior how to behave with the error class display. It's currently hardcoded as it is and the "determine isValid" currently does it the other way around.
The quick solution is to use the undocumented (probably because of supposed internal usage only), behavior.