Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross field validation issue #544

Open
alikon opened this issue Nov 15, 2021 · 1 comment
Open

Cross field validation issue #544

alikon opened this issue Nov 15, 2021 · 1 comment

Comments

@alikon
Copy link

alikon commented Nov 15, 2021

Describe the bug

the field4 should be greather than field5 and field5 should be less than field4

image

but after changing field4 the rule of field5 doesn't are in synch with the new value ( see image)

the same problem happens viceversa

image

we have this validation on a json file

...
    "field4": {
        "required": true,
        "greaterThan": { "fieldName": "field5" }
    },
    "field5": {
        "required": true,
        "lessThan": { "fieldName": "field4" }
    },
...

in our component we configure the rules thru the json file

  this.http.get('assets/tab-test-validation.json').subscribe((dyn: any) => { 
      this.formBuilderConfig = new FormBuilderConfiguration({
        dynamicValidation:  JSON.parse(JSON.stringify(dyn)),       
      });

Expected Behavior

both rules for field4 and field5 should be triggered on synch with field changes

Package Version

@rxweb/@

"@rxweb/reactive-dynamic-forms": "0.0.5",
"@rxweb/reactive-form-validators": "^2.1.6",
@michelebenolli
Copy link

Is there any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants