Hi Klas,
Thanks for your reply!
I am using your tip, but this validation has the opposite effect to what I wanted. What I wanted was to allow only those IDs that are in a table, and did not check if there is already an equal.
What I want is:
if(ID field form == ID on table)
registration success
else
"your ID does not exist, you can't register"
Thank you!