On the Validation Rules you can click o New and select the attribute and set it to Unique. You need to do it two times for two different attributes. You can also validate the Uniqueness by handling the object and checking it for uniqueness in a Microflow. This can be achieved on an action button and you can retrieve the list of objects from the DB and loop them to check whether the attribute already exists.
Hope this Helps!!!