vault/ui/app/forms/transform/alphabet.ts
Vault Automation 70d5341132
[UI] Ember Data Migration - Transform Alphabets views | VAULT-45706 (#15184) (#15187)
* VAULT-45706 - migrated transform alphabets views

* fixed failing test

Co-authored-by: mohit-hashicorp <mohit.ojha@hashicorp.com>
2026-06-04 15:22:42 +00:00

35 lines
1.1 KiB
TypeScript

/**
* Copyright IBM Corp. 2016, 2026
* SPDX-License-Identifier: BUSL-1.1
*/
import Form from 'vault/forms/form';
import FormField from 'vault/utils/forms/field';
import type { Validations } from 'vault/app-types';
type AlphabetData = {
name?: string;
alphabet?: string;
backend?: string;
};
export default class AlphabetForm extends Form<AlphabetData> {
// Required by secret-edit-layout.hbs to resolve the correct editComponent via options-for-backend
idPrefix = 'alphabet/';
formFields = [
new FormField('name', 'string', {
editDisabled: true,
subText: 'The alphabet name. Keep in mind that spaces are not allowed and this cannot be edited later.',
}),
new FormField('alphabet', 'string', {
label: 'Alphabet',
subText:
'Provide the set of valid UTF-8 characters contained within both the input and transformed value.',
docLink: '/vault/api-docs/secret/transform#create-update-alphabet',
}),
];
validations: Validations = {
alphabet: [{ type: 'presence', message: 'Alphabet is required.' }],
};
}