Add register function validation