I have a table that has ‘cidr_block’ and ‘gateway’ fields. I would like to know if it is possible to use ‘cidr_block’ to validate ‘gateway’ in the rules[]?
Something like:
[['cidr_block', 'gateway'], 'required'],
[['gateway'], 'ip', 'ranges'=>'cidr_block'],