# masked

> **\[danger] DEPRECATION WARNING**
>
> The Masked Input Plugin this component is based on is no longer in active development. This field will be removed in v3.

## Masked input field

This is a masked input field for formatted string values. (e.g. phone number, zip code, card numbers...etc)

> Please note, this field depend on the following library:
>
> * [jQuery](http://www.jquery.com)
> * [maskedinput](http://digitalbush.com/projects/masked-input-plugin/)

### Special properties of field

| Property       | Default | Accepted values                                                       | Description                                                                                                       |
| -------------- | ------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `autocomplete` | *none*  | [see doc](https://html.spec.whatwg.org/multipage/forms.html#autofill) | Indicates whether the value of the control can be automatically completed by the browser.                         |
| `mask`         | *none*  | `String`                                                              | Mask for input field (E.g. `(99) 999-9999`)                                                                       |
| `maskOptions`  | *none*  | `Object`                                                              | Settings to masked component. [Read more info from options](http://digitalbush.com/projects/masked-input-plugin/) |
| `placeholder`  | *none*  | `String`                                                              | Placeholder text for input field                                                                                  |
| `readonly`     | `false` | `Boolean`                                                             | If true, the input field is read only                                                                             |

#### maskOptions

@TODO

### Usage

**Phone number masked field**

```javascript
{
    type: "masked",
    label: "Mobile phone",
    model: "mobile",
    mask: "(99) 999-9999"
}
```

**Date masked field**

```javascript
{
    type: "masked",
    label: "Date",
    model: "date",
    mask: "99/99/9999",
    maskOptions: {
      placeholder: "mm/dd/yyyy"
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vue-generators.gitbook.io/vue-generators/develop/fields/optional_fields/masked.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
