SiFormModule Type documentation¶
TypeScript declaration¶
withConfiguration Overrides the default configuration of the form module. { validationErrorMapper } : import { SiFormModule } from '@siemens/element-ng/form';
() => SiFormModule ¶
({ validationErrorMapper }: { validationErrorMapper: SiFormValidationErrorMapper; }) => ModuleWithProviders<SiFormModule> ¶
{ validationErrorMapper: SiFormValidationErrorMapper; } ¶
Types Documentation¶
Interface for form error mapper. It resolves a key to either a translatable string or function which is called with the validation error for its key and should return a translatable string. dateFormat ? : email ? : max ? : maxDate ? : maxLength ? : min ? : minDate ? : minLength ? : numberFormat ? : pattern ? : required ? : requiredTrue ? : import type { SiFormValidationErrorMapper } from '@siemens/element-ng/form';
TranslatableString | ((error: { format: string; }) => TranslatableString) ¶ TranslatableString | ((error: { email: boolean; }) => TranslatableString) ¶ TranslatableString | ((error: { max: number; actual: number; }) => TranslatableString) ¶ TranslatableString | ((error: { max: Date; actual: Date; }) => TranslatableString) ¶ TranslatableString | ((error: { requiredLength: number; actualLength: number; }) => TranslatableString) ¶ TranslatableString | ((error: { min: number; actual: number; }) => TranslatableString) ¶ TranslatableString | ((error: { min: Date; actual: Date; }) => TranslatableString) ¶ TranslatableString | ((error: { requiredLength: number; actualLength: number; }) => TranslatableString) ¶ TranslatableString | ((error: { numberFormat: boolean; }) => TranslatableString) ¶ TranslatableString | ((error: { pattern: string | RegExp; }) => TranslatableString) ¶ TranslatableString | ((error: { required: boolean; }) => TranslatableString) ¶ TranslatableString | ((error: { required: boolean; }) => TranslatableString) ¶
Represents a translatable string. This can either be a translation key, e.g. import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.
Except where otherwise noted, content on this site is licensed under MIT License.