Files
backstage/.changeset/nasty-dragons-melt.md
T
Alex Rybchenko 6b261d9b29 updated changeset
Signed-off-by: Alex Rybchenko <arybchenko@box.com>
2022-12-13 18:06:15 +01:00

536 B

@backstage/plugin-scaffolder
@backstage/plugin-scaffolder
patch

Form data is now passed to validator functions in 'next' scaffolder, so it's now possible to perform validation for fields that depend on other field values. This is something that we discourage due to the coupling that it creates, but is sometimes still the most sensible solution.

export const myCustomValidation = (
  value: string,
  validation: FieldValidation,
  { apiHolder, formData }: { apiHolder: ApiHolder; formData: JsonObject },
) => {
  // validate
};