make validator ignore error empty when the element didn't has required attribute