-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
DX Custom Rule #234
Comments
|
Thanks Daniel! I totally missed the note about function-style dx expressions - that's really brilliant. Does this mean that the dx-syntax is just there to enable a shorter form for writing very simple expressions or is there a performance penalty in choosing one style over the other? I would imagine the dx-expressions must be slightly slower - since they need to be parsed/processed? (probably not even measurable for most common situations). I'll leave this issue open until the bug is fixed. If you have another issue tracking the bug - please feel free to close this one. |
If you want to pass the schema to server, you can only use the string-style dx. |
Hi guys,
I'm writing a Vue app with a form containing 3 fields (ID, Profile, Account). All 3 are number fields.
I need to write a validation rule that checks that at least one of the 3 is populated.
From what I understood - I could do this with a custom rule.
I have 2 questions:
Can you please see if I'm on the right track? I've tried various expressions, but I can't seem to hit the right one and I also don't see the two other rules fire when the first one evaluates....
This is the rule on the "id" field:
"rules":{
"customRule": [{
"script": "dx: !{{$root.Victim.identityNumber}} && !{{$root.Victim.profileNumber}} && !{{$root.Victim.accountNumber}} ",
"errMsg": "You need to specify at least one of the following: an ID Number or Profile number or Account number",
"linkItems": [
{
"fieldPath": "profileNumber",
"customRuleIdx": 0
},
{
"fieldPath": "accountNumber",
"customRuleIdx": 0
}
]
}]
}
Many thanks,
D
The text was updated successfully, but these errors were encountered: