Updated validity property to only be set if needed