You didn't get me. You can change the color of this field, it's very easy to do with the program code. We can simply use the "OnChange" event of the form element and make a query to the database, which will check - does such a TIN already exist or not?
But - imagine that the length of the TIN is ten characters. And when entering each character, the program every time will make query to the database. From the point of view of the correctness of the program architecture, this is incorrect and cannot be done!
Therefore, checks for duplication of elements are performed at the time of saving (or posting), but not at the time of user input of data.