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
We have implemented the async angular part of formeditor into a few of our projects, so far its just been a stellar experience, but we are seeing a thing with "validation" just not working. We have been trying to debug it our selfs, also the reason for @schonert 2 PRs.
We have a form with a few fields in, and 1 validation rule, that a number field must have a value of 10.
When we submit the form with out any fields filled out, it will say "Number SKAL være 10" as it should. But when we fill out the field "10" it still says it.
Then when we FORCE through the form, the response we get from the service is : {"invalidFields":[],"failedValidations":[{"rules":[{"field":{"name":"Number","formSafeName":"_Number","submittedValue":"10","invalid":false},"condition":{"expectedFieldValue":"10","type":"core.fieldvalueis"}}],"errorMessage":"Number SKAL være 10","invalid":true}]}
So it says we submit 10, it expects 10 and its invalid.
We also tried it with an email field which had the validation of "value is" [email protected] which gave the same we submit correct but it throws back an error for us.
Here is the "script" output on the page which also seems stellar:
` var _formDefaultValues = {};
_formDefaultValues._Checkbox_group = ["Option 2"];
_formDefaultValues._Radio_button_group = "Option 1";
var _formValidations = [{"rules":[{"field":{"name":"Number","formSafeName":"_Number","submittedValue":null,"invalid":false},"condition":{"expectedFieldValue":"10","type":"core.fieldvalueis"}}],"errorMessage":"Number SKAL være 10","invalid":false}];
var _formId = 1190;
var _formTotalPages = 1;
var _formHasReceipt = true;
`
We cannot see the error hope you can, help us (K)Benn Kanobi, your our only hope :)
The text was updated successfully, but these errors were encountered:
I think you have it backwards :) for that validation you'll want to use a "Value is not" condition, not "Value is".
But... I understand why you're confused. Actually I am too. The help text isn't exactly helpful, as a matter of fact it is completely wrong. I'll get on that fixed for the next release. It should read something in the lines of "A validation consists of a set of rules to test, and an error message to display if all the rules in the validation are fulfilled." instead of "A validation consists of a set of rules that must be fulfilled, and an error message to display if the rules are not fulfilled."
I haven't tested it with numeric fields, but it works with email fields just fine.
Oh snap yeah that is confusing, no one at our office caught that, i was thinking if we could just rename the conditions to be like "Value must be" 10. Or some other naming because if we all confused the customers will to :)
Hey there :)
We have implemented the async angular part of formeditor into a few of our projects, so far its just been a stellar experience, but we are seeing a thing with "validation" just not working. We have been trying to debug it our selfs, also the reason for @schonert 2 PRs.
We have a form with a few fields in, and 1 validation rule, that a number field must have a value of 10.
When we submit the form with out any fields filled out, it will say "Number SKAL være 10" as it should. But when we fill out the field "10" it still says it.
Then when we FORCE through the form, the response we get from the service is :
{"invalidFields":[],"failedValidations":[{"rules":[{"field":{"name":"Number","formSafeName":"_Number","submittedValue":"10","invalid":false},"condition":{"expectedFieldValue":"10","type":"core.fieldvalueis"}}],"errorMessage":"Number SKAL være 10","invalid":true}]}
So it says we submit 10, it expects 10 and its invalid.
We also tried it with an email field which had the validation of "value is" [email protected] which gave the same we submit correct but it throws back an error for us.
Here is the "script" output on the page which also seems stellar:
` var _formDefaultValues = {};
_formDefaultValues._Checkbox_group = ["Option 2"];
_formDefaultValues._Radio_button_group = "Option 1";
`
We cannot see the error hope you can, help us (K)Benn Kanobi, your our only hope :)
The text was updated successfully, but these errors were encountered: