add a validator to the name field