Add initial version of register with validation.