custom validation corrected