Add validation logic to controllers