add register test with validation code.