Browse documentation

Masked Input

A text field that formats as the user types and refuses values in the wrong format.

What it does. Asset tags, cost centres, serial numbers and phone numbers all have a shape. A plain text field accepts every variation of that shape, and the cleanup lands on whoever has to report on the data later. This field applies the format while the value is being typed.

Jira → Settings → Issues → Custom fields → Masked Input → Contexts → Edit configurationIllustration

Masked Input configuration

Save Configuration
Template Library
Asset tagUS phone (local)Cost centerSerial numberIPv4 addressMAC address+ 13 more
Clicking a preset preloads the mask, regex and algorithm. You can edit any of them afterwards.
Mask Pattern
AT-####-AAA
Allowed Characters
Alphanumeric
Letter Transform
Uppercase
Algorithm Check
No algorithm check
Validation Regex
^AT-\d{4}-[A-Z]{3}$
Regex runs against the raw value with mask literals removed.
Helper Text
Asset tag printed on the device label.
Invalid Value Message
Use the format AT-1234-ABC.
Block invalid values
Preview
AT-4192-XDR
✓ Formatted output: AT-4192-XDR

Start from a preset

The Template Library ships 19 presets, and this is all of them: US phone (local and with country code), phone extension, international phone, ZIP and ZIP+4, asset tag, project code, cost centre, serial number, hostname, SKU or part number, purchase order, order reference, invoice number, contract number, IPv4 address, MAC address and UUID.

Clicking a preset fills in the mask, the regular expression and the algorithm check. Everything stays editable afterwards. Start from a preset even if you need to change it — it is faster than writing a mask from scratch.

How the mask works

Mask Pattern describes the value position by position: # means a digit, A means a letter, and any other character is a literal that the app inserts for the user. AT-####-AAA accepts AT-4192-XDR and adds the dashes automatically.

SettingWhat it doesNotes
Allowed CharactersRestricts typing to Digits, Letters, Alphanumeric or Hexadecimal.Blocks the wrong keystroke before it becomes a wrong value.
Letter TransformNo transform, Uppercase or Lowercase, applied while typing.This is why at-4192-xdr and AT-4192-XDR do not both end up in your reports.
Validation RegexAn extra check against the raw value, with the mask literals removed.For rules a mask cannot express.
Algorithm CheckNo algorithm check, US phone rules or IPv4 parser.Structural validation beyond the pattern, so 999.999.999.999 is rejected as an IP address.

What the user sees

Helper Text
Shown under the field. Say where the value comes from: “Asset tag printed on the device label” is useful; “Enter asset tag” is not.
Invalid Value Message
Shown when validation fails. Always include a correct example.
Block invalid values
On: the value cannot be saved. Off: the user is warned but the value is accepted. Start with it off on an existing field, then turn it on once the legacy values are cleaned up.
Preview
Types a sample value through your current settings, inside the configuration screen. Use it before saving.
Masking is formatting, not encryption
This field keeps values in a consistent shape. The value is stored as an ordinary Jira custom field value and is visible to anyone who can see the issue. Do not use it for passwords or keys. To find credentials that are already in your issues, see Secret Scanner.
The mask applies where the app draws the editor
That is the issue view, the create screen, transition screens and the portal — which is everywhere a person normally types into the field. It is not enforced on surfaces Jira renders with its own text editor, such as bulk edit or the issue navigator, nor on a write through the public REST API. The only rule that reaches those is a 255-character cap. If clean data matters more than convenience, say so in the Helper Text and check the field periodically rather than assuming the mask is a constraint on the database.

Something missing or wrong on this page? Tell us in the support portal or email contact@synapseoasis.com.