Validation | required="true" / "false" | HTML form

'Required' is a Boolean attribute. It assumes the value of true once it is present. therefore setting it to a 'false' still makes it act as though it was true.

Below is proof

<form>
<input type="password" name="password" required="false">
<button>Submit</button>
</form>

In HTML, the required attribute must be present (the field is required) or absent (the field is NOT required). When the attribute is present, it does not matter what value it has.

The required attribute is a boolean attribute. When specified, the element is required.

The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

About boolean attributes:

A boolean attribute without a value assigned to it (e.g. checked) is implicitly equivalent to one that has the empty string assigned to it (i.e. checked=""). As a consequence, it represents the true value.

The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.

A common practice is to use the name of the attribute as its value:

<form>
    <input type="password" name="password" required="required"><!-- this input is required -->

    <input type="text" name="sometext"><!-- this input is NOT required -->

    <button>Submit</button>
</form>

required doesn't take a boolean string. It's required if the attribute exists at all. Sublime is likely expecting some value like most attributes.

<form>
<input type="password" name="password" required="">
<button>Submit</button>
</form>

<form>
<input type="password" name="password" required>
<button>Submit</button>
</form>