Update Validator.php

doReplacements() changed to be able to call a method dynamically.