Fix validation in register action.