@mutt/widget-personnummer

2.1.0 • Public • Published

Mutt Forms Widget - Personnummer

Mutt Forms Vue widget for Swedish Personnummer lookup.

It is designed to be integrated with https://www.ratsit.se/.

Field Options

This ssn options accepts the following properties:

Property Type Required Default Description
host String true null Provider API host
username String true null Username for the provider API
password String true null Password for the provider API
template String false '{givenName} {lastName}' Template used to display a search result referencing object properties in the returned result
requiredFieldPaths String[] false null An array of field paths to check for values in the returned search result
minimumAge Number false null The minimum age in years

Complete Example

{
  "field_name": {
    "widget": "personnummer",
    "ssn": {
      "host": "https://example.com/ssn-lookup",
      "username": "username",
      "password": "password123",
      "template": "{ssn} - {givenName} {lastName}",
      "minimumAge": 18
    }
  }
}

Field Events

  • ssnSelect: Emitted when the value has been entered and the detail confirmed
  • ssnClear: When the value is changed/cleared
  • toggleOverlay: Natural language form support
  • ssnRequiredFieldsMissing: When requiredFieldPaths are specified and are missing values

i18n Support

The widget has i18n support via the Vue i18n Plugin or any other tools that expose a $t function to translate strings.

Package Sidebar

Install

npm i @mutt/widget-personnummer

Weekly Downloads

12

Version

2.1.0

License

MIT

Unpacked Size

12.8 kB

Total Files

3

Last publish

Collaborators

  • stevenroberts-bbm
  • lcgreen
  • chris.stroud
  • nicksnell
  • andypattendenbbm
  • samhicks1985
  • shaunkrd
  • guyf
  • ant_p
  • muttbot
  • andyflynn-bbm
  • purepear
  • alexrussell
  • batornator
  • sugarbits
  • denis.gruba-bbm