Ivandt logo

Password Field

Masked text input for sensitive data

The password field provides a text input where the content is masked with dots/asterisks for security. It behaves like a text field but with visual masking in the UI.

Basic Usage

{
  type: 'password',
  label: 'API Key',
  key: 'apiKey',
  order: 0
}

Properties

All password fields support the common field properties.

Use Cases

  • Passwords, PINs
  • API keys, tokens
  • Secret keys, credentials
  • Any sensitive data that should be visually masked

Example

import type { IvtSchema } from '@ivandt/importer';

const schema: IvtSchema = {
  title: 'User Import',
  publicKey: 'pk_live_xxx',
  sessionToken: 'session_xxx',
  fields: [
    {
      type: 'text',
      label: 'Username',
      key: 'username',
      order: 0,
      validators: [
        { type: 'required' }
      ]
    },
    {
      type: 'password',
      label: 'Password',
      key: 'password',
      order: 1,
      validators: [
        { type: 'required' },
        { type: 'minLength', value: 8 }
      ]
    },
    {
      type: 'password',
      label: 'API Key',
      key: 'apiKey',
      order: 2,
      validators: [
        { type: 'regex', pattern: '^[A-Za-z0-9]{32}$' }
      ]
    }
  ]
};

Security Note

The password field only provides visual masking in the UI. The actual data is still:

  • Transmitted in the final JSON output
  • Visible in browser dev tools
  • Not encrypted by the SDK

For true security, ensure your backend:

  • Uses HTTPS for all communications
  • Hashes passwords before storage
  • Follows security best practices