Update invitation documentation adding a custom validator

Add a custom validator to the invitation documentation to check if the code has already been used.