isMeta : Name -> Bool `True` if the provided attribute name is a meta attribute.
Totality: total
Visibility: public exportisAttrOf : Name -> List Attribute -> Bool `True` if the provided attribute name is found.
Totality: total
Visibility: public exportmetaAttrs : List Attribute -> List Name Extract the list of meta attributes.
Totality: total
Visibility: public exportallowed : List Name -> List Attribute -> Either String (List Attribute) Ensures that the attributes are all among the provided allowed attributes.
An error message is returned if one or more of the attributes are not among
the list of allowed attributes.
Totality: total
Visibility: public exportallowedGlobal : List Name -> List Attribute -> Either String (List Attribute) Similar to `allowed` but also allow custom global attributes.
The additional allowed attributes are the ones starting with "aria-" or
"data-".
Totality: total
Visibility: public exportallowedIfPresent : Name -> Name -> List Attribute -> Either String (List Attribute) Ensures that an attribute is only used if another attribute is present.
Totality: total
Visibility: public exportlengthAmong : Nat -> List Name -> List Attribute -> Either String (List Attribute) Check for a minimal number of attributes present among the provided list.
An error message is returned if the number of such attributes is not at
least of the provided length.
Totality: total
Visibility: public exportnonEmpty : Attribute -> Either String Attribute Ensures that the attribute value is not empty.
An error message is returned if the attribute value is empty or only
composed of white spaces.
Totality: total
Visibility: public exportnoOtherAttrs : List Name -> List Name -> List Attribute -> Either String (List Attribute) Ensures that there a no other attributes among the one provided.
An error is returned if all the `attrs` are present in `allAttrs` and
there is another attribute in `allAttrs` which is also present in `among`.
@attrs Attributes to check which are a subset of `among`.
@among Attributes against which are checked all attributes.
@allAttrs All the attributes.
Totality: total
Visibility: public exportrequired : Name -> List Attribute -> Either String (List Attribute) Returns either the attributes' list or an error message.
An error message is returned if the required attribute is not present in the
list.
Totality: total
Visibility: public exportrequiredIfPresent : Name -> Name -> List Attribute -> Either String (List Attribute) Returns either the attributes' list or an error message.
An error message is returned if the provided attribute is present in the
list while the required attribute is missing.
Totality: total
Visibility: public exportunique : List Attribute -> Either String (List Attribute) Ensures that all attributes are unique.
An error message is returned if a duplicate attribute name is found.
Totality: total
Visibility: public exportglobalAttributes : List Attribute -> Either String (List Attribute) Ensures that all the attributes are global attributes.
Totality: total
Visibility: public exportstandard : List Attribute -> Either String (List Attribute) Global attributes and unique attributes validation.
This validation is the minimal one for any HTML element.
Totality: total
Visibility: public exportareaAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **area** element.
Totality: total
Visibility: public exportbaseAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **base** element.
Totality: total
Visibility: public exportdataAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **data** element.
Totality: total
Visibility: public exportembedAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **embed** element.
Totality: total
Visibility: public exportimgAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **img** element.
There must be:
- an **alt** attribute;
- a **src** and/or **srcset**.
Totality: total
Visibility: public exportlabelAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **label** element.
Totality: total
Visibility: public exportliAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **li** element.
Totality: total
Visibility: public exporthtmlAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **html** element.
Totality: total
Visibility: public exportmetaAttributes : List Attribute -> Either String (List Attribute) Ensures that the attributes of a **meta** element are correctly structured.
There must be:
- only global or meta attributes;
- at least one meta attribute;
- only the meta attribute **charset** as meta attribute if present;
- both and only meta attributes **name** and **content** if one of them is
present;
Totality: total
Visibility: public exportscriptAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **script** element.
Totality: total
Visibility: public exportsourceAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **source** element.
Totality: total
Visibility: public exporttrackAttributes : List Attribute -> Either String (List Attribute) Attributes allowed in a **track** element.
Totality: total
Visibility: public export