study how to add validation in the action