Skip to content

EnInputSsn

Preview

Props

NameDescriptionDefaultControl
allowEinFormat

Allows EIN style formatting (##-#######).

boolean
true
allowDummySsn

Allows dummy SSN values through the validation.

boolean
false
assumeTin

If an unformatted string is passed to the component, the default masking will be set to the TIN format.

boolean
false
resetValidationOnMount

Resets validation on mount.

boolean
false
obscure

Renders the field in "secure" mode: every digit is masked with * while remaining editable (the real, unmasked value is still tracked and emitted via v-model for form submission). A button toggles the mask off to reveal the full value and back on again. SSN vs. EIN/TIN detection works the same as the normal field: a dash typed as the 3rd character selects EIN/TIN format (and the * overlay shows the dash), otherwise SSN. assumeTin / allowEinFormat still force a format when set.

Also applies in displayOnly mode: the static value is rendered with every digit replaced by *. Pair with allowReveal to add an inline button for revealing/hiding it.

boolean
false
allowReveal

In displayOnly + obscure mode, shows an inline button to toggle the masked value between hidden (*) and revealed. Has no effect on the editable field (which always shows its toggle).

boolean
false
value

Used for a raw value passed into the input.

string | number
unknown
name

Sets name attribute for the input. Required for proper form handling.

string
null
id

Sets id attribute for input. If left blank, it will default to the name prop. This should always be matched to a label's "for" attribute for proper accessibility.

string
null
placeholder

Sets the placeholder value.

string
null
label

Used to describe field in error message

string
null
disabled

Sets the disabled attribute.

boolean
null
required

Sets the field to required.

boolean
false
typeCast

Used to specifically validate different types.

string
"string"
mode

Sets when and how often validation occurs. TODO: create docs for modes

string
"eager"
displayOnly

Displays the value of the field in a span element, instead of as an input.

boolean
false
rules

A pipe separated string of validation rules for the field. View validation rules

string
""
renderInForm

Prevents a field from being rendered at all when used in the fields prop of the EnForm component. Can be passed a function that returns true or false for conditional validation.

boolean | Function
true
renderInTable

Prevents a field from generating a column/heading in the EnTableBasic component. Can be passed a function that returns true or false for conditional validation.

boolean | Function
true
customMessages

Provide a custom error messages by rule. Should be an object with keys that match the rule name and value being a string of the message to display.

Record<string, any>
null

Slots

display

No description

Variables
NameTypeDescription
display-valueunknown
valueunknown

Events

No events defined.

Methods

NameDescription
focus

Focuses the input element.