added validate action for controllers