Registration works, validation doesnt