cleaned custom validation code
cleaned custom validation code