diff --git a/docs/features/software-templates/writing-custom-field-extensions.md b/docs/features/software-templates/writing-custom-field-extensions.md index 1fb26b7977..ebb7af4398 100644 --- a/docs/features/software-templates/writing-custom-field-extensions.md +++ b/docs/features/software-templates/writing-custom-field-extensions.md @@ -34,14 +34,20 @@ import { KubernetesValidatorFunctions } from '@backstage/catalog-model'; /* This is the actual component that will get rendered in the form */ -export const MyCustomExtension = ({ onChange, rawErrors, required, formData }: FieldProps) => { - return ( - 0 && !formData} - onChange={onChange} /> - ) +export const MyCustomExtension = ({ + onChange, + rawErrors, + required, + formData, +}: FieldProps) => { + return ( + 0 && !formData} + onChange={onChange} + /> + ); }; /* @@ -50,14 +56,14 @@ export const MyCustomExtension = ({ onChange, rawErrors, required, formData }: F */ export const myCustomValidation = ( - value: string, - validation: FieldValidation, + value: string, + validation: FieldValidation, ) => { - if (!KubernetesValidatorFunctions.isValidObjectName(value)) { - validation.addError( - 'must start and end with an alphanumeric character, and contain only alphanumeric characters, hyphens, underscores, and periods. Maximum length is 63 characters.', - ); - } + if (!KubernetesValidatorFunctions.isValidObjectName(value)) { + validation.addError( + 'must start and end with an alphanumeric character, and contain only alphanumeric characters, hyphens, underscores, and periods. Maximum length is 63 characters.', + ); + } }; ```