Easy Tutorial
❮ Prop Win Length Prop Style Bordercolor ❯

Input Month required Attribute

Input Month Object

Example

Check if the month field is a required field before submitting the form:


Definition and Usage

The required attribute is used to set or return whether the month field is a required field in the form.

This attribute reflects the HTML required attribute.


Browser Support

All major browsers support the required attribute, except Internet Explorer 9 and earlier versions, and Safari.

Note: Internet Explorer and Firefox do not support the <input> element with type="month".


Syntax

Return the required attribute:

Set the required attribute:

Attribute Values

Value Description
true|false Describes whether the month field is a required part before form submission. true - The month field is a required part of the form. false - Default. The month field is an optional part of the form.

Technical Details

| Return Value: | Boolean, returns true if the month field is a required part of the form, otherwise returns false. | | --- | --- |


More Examples

Example

Set the month field as a required part of the form:


Related Pages

HTML Reference: HTML <input> required Attribute


❮ Prop Win Length Prop Style Bordercolor ❯