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