adding validatefunction: on validation attribute