[4.2] add setter and getter for Validatior

for #4037 and #4714
One is 'set', 'add' is another.