Small fixes in lib/Validations.php