/src/main/java/org/htmlunit/html/HtmlElement.java
if(required) {  setAttribute(org.htmlunit.html.HtmlElement.ATTRIBUTE_REQUIRED, org.htmlunit.html.HtmlElement.ATTRIBUTE_REQUIRED);}else {  removeAttribute(org.htmlunit.html.HtmlElement.ATTRIBUTE_REQUIRED);};
if ( isRequiredSupported ( ) ) { if ( required ) { setAttribute ( ATTRIBUTE_REQUIRED, ATTRIBUTE_REQUIRED ) ; }
return isRequiredSupported() && hasAttribute(ATTRIBUTE_REQUIRED); } public boolean isOptional() { return isRequiredSupported() && !hasAttribute(ATTRIBUTE_REQUIRED); } public void setRequired(final boolean required) { <extra_id_0> else { removeAttribute(ATTRIBUTE_REQUIRED); } } } @Override