Is it possible to pass attributes from a page into a validator as a parameter for use in its logic? I'm trying to pass the Id of the record into an async validator which should then query the database for the record to check whether it is in a valid state to be saved, but I don't seem to be able to pass the attribute in as a parameter and it isn't available by default in the validator. I've tried the below:
"LookupAttribute_sttlz00": { "modelConfig": { "path": "PDS.QualifyStatus" }, "validators": { "LeadSoldValidator": { "type": "Usr.LeadSoldValidator", "params": { "leadId": "$Id" } } }, },
But it just passes in the literal string "$Id" instead of the value of Id. I don't see anything about passing dynamic values into validators in the documentation.
Like
Hello,
Currently, this task is in the development and now it is impossible to do so. The ability to add dynamic parameters will be available in the future versions.
Dmytro Vovchenko,
Any idea when it's going to be available? I have a couple of custom validations that test for a regEx expression and I'd like to be able to store those regEx expressions as a setting instead of hard coding them in the code.
Thanks,
Jose
Jose Hernandez
Hello,
Unfortunately, we cannot say in which version this functionality will be implemented, as our development team is working on tasks according to their priority, which in turn
is determined by the number of requests with this need.