Open cbichis opened 3 years ago
@cbichis You can use the callback validator and the second parameter on the callback function which provides all values of the input-filter:
Thanks, @froschdesign . As far as I understand the value provided is the unfiltered/raw value not the filtered one (eventually even already validated better).
Let's give an example whys is this needed: let's say we have 2 inputs supplying id's. A second input having id may be correct depending on the first input with id.
Initially the first id is filtered (transforming the string id, trimming, striping tags and then looking up into database) into an object (or null if no object). Then another lookup may search by example into a m-m/1-m relation to see if the second id is valid...
@cbichis Any help is welcome, so pull requests are always appreciated. Go for it! 👍
Feature Request
Summary
It would be nice to be able to get the filtered/validated value for other input element (referenced with token), as per form example for Identical Validator.
https://docs.laminas.dev/laminas-validator/validators/identical/#form-elements
Currently it seems impossible to do this. Even for Identical Validator this only can validate a static value, not other input value.