Skip to content

Commit

Permalink
fix rebase problem
Browse files Browse the repository at this point in the history
  • Loading branch information
langz committed Sep 9, 2024
1 parent 8b514cb commit a3d24ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ You can provide your own validation function.

### Extend validation with custom validation function

You can extend the existing validation(dnr and fnr) with your own validation function.
You can extend the existing validations(`dnrValidator` and `fnrValidator`) with your own validation function.

<Examples.ValidationExtendValidator />
9 changes: 8 additions & 1 deletion packages/dnb-eufemia/src/extensions/forms/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ export type ValidatorAdditionalArgs<
Value,
ErrorMessages = DefaultErrorMessages,
> = {
/**
* Returns the error messages from the { errorMessages } object.
*/
errorMessages: ErrorMessages
validators: Record<string, Validator<Value>>

/**
* Connects the validator to another field.
* This allows you to rerun the validator function once the value of the connected field changes.
*/
connectWithPath: (path: Path) => { getValue: () => Value }

/**
Expand Down

0 comments on commit a3d24ad

Please sign in to comment.