substitution code in validation for img's