add simple validation handler