Skip to content

Commit

Permalink
fix(Forms): ensure connectWithPath type is given
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Jan 27, 2025
1 parent 430a373 commit b9580fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ export default function useFieldProps<Value, EmptyValue, Props>(
exportValidatorsRef.current = exportValidators
const additionalArgs = useMemo(() => {
const args: ValidatorAdditionalArgs<Value> = {
/** @deprecated – can be removed in v11 */
/** Deprecated – can be removed in v11 */
...combinedErrorMessages,

errorMessages: combinedErrorMessages,
Expand Down
4 changes: 2 additions & 2 deletions packages/dnb-eufemia/src/extensions/forms/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export type ValidatorReturnAsync<Value> =
| Promise<ValidatorReturnSync<Value>>
export type Validator<Value, ErrorMessages = DefaultErrorMessages> = (
value: Value,
additionalArgs?: ValidatorAdditionalArgs<Value, ErrorMessages>
additionalArgs: ValidatorAdditionalArgs<Value, ErrorMessages>
) => ValidatorReturnAsync<Value>
export type ValidatorAdditionalArgs<
Value,
Expand All @@ -62,7 +62,7 @@ export type ValidatorAdditionalArgs<
/**
* Returns the validators from the { exportValidators } object.
*/
validators: Record<string, Validator<Value>>
validators: Record<string, Validator<Value>> | undefined
} & {
/** @deprecated use the error messages from the { errorMessages } object instead. */
pattern?: string
Expand Down

0 comments on commit b9580fe

Please sign in to comment.