# ef-password-field

A form control element for password.

## Properties

| Property      | Attribute     | Type             | Default | Description                                      |
|---------------|---------------|------------------|---------|--------------------------------------------------|
| `clears`      | `clears`      | `boolean`        | false   | Show clears button                               |
| `disabled`    | `disabled`    | `boolean`        | false   | Set disabled state                               |
| `error`       | `error`       | `boolean`        | false   | Set error state                                  |
| `maxLength`   | `maxlength`   | `number \| null` | null    | Set character max limit                          |
| `minLength`   | `minlength`   | `number \| null` | null    | Set character min limit                          |
| `pattern`     | `pattern`     | `string`         | ""      | Set regular expression for input validation      |
| `placeholder` | `placeholder` | `string`         | ""      | Set placeholder text                             |
| `readonly`    | `readonly`    | `boolean`        | false   | Set readonly state                               |
| `transparent` | `transparent` | `boolean`        | false   | Disables all other states and border/background styles. |
| `value`       | `value`       | `string`         | ""      | Input's value                                    |
| `warning`     | `warning`     | `boolean`        | false   | Set warning state                                |

## Methods

| Method           | Type          | Description                                      |
|------------------|---------------|--------------------------------------------------|
| `checkValidity`  | `(): boolean` | Returns `true` if the element input is valid; otherwise, returns `false`. |
| `reportValidity` | `(): boolean` | Validate the element input and mark it as error if its input is invalid. |

## Events

| Event           | Description                                      |
|-----------------|--------------------------------------------------|
| `error-changed` | Fired when user inputs an invalid value. The event is not triggered if `error` property is changed programmatically. |
| `value-changed` | Fired when user commits a value change. The event is not triggered if `value` property is changed programmatically. |
