update space valid code