created custom validator