First validation code