Synchronous validation code