Add validation logic