@angular/forms 21.1.3 → 21.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_structure-chunk.mjs +31 -5
- package/fesm2022/_structure-chunk.mjs.map +1 -1
- package/fesm2022/forms.mjs +128 -128
- package/fesm2022/forms.mjs.map +1 -1
- package/fesm2022/signals-compat.mjs +4 -1
- package/fesm2022/signals-compat.mjs.map +1 -1
- package/fesm2022/signals.mjs +29 -15
- package/fesm2022/signals.mjs.map +1 -1
- package/package.json +4 -4
- package/resources/code-examples.db +0 -0
- package/types/_structure-chunk.d.ts +171 -165
- package/types/forms.d.ts +1 -1
- package/types/signals-compat.d.ts +1 -1
- package/types/signals.d.ts +16 -10
package/fesm2022/signals.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signals.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/field/di.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/di.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/controls/interop_ng_control.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/form_field_directive.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/disabled.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/hidden.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/readonly.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/util.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validation_errors.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/email.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/max.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/max_length.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/min.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/min_length.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/pattern.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/required.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_async.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_tree.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/standard_schema.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_http.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/debounce.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {SignalFormsConfig} from '../api/di';\n\n/** Injection token for the signal forms configuration. */\nexport const SIGNAL_FORMS_CONFIG = new InjectionToken<SignalFormsConfig>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'SIGNAL_FORMS_CONFIG' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {type Provider} from '@angular/core';\nimport {SIGNAL_FORMS_CONFIG} from '../field/di';\nimport type {FormField} from './form_field_directive';\n\n/**\n * Configuration options for signal forms.\n *\n * @experimental 21.0.1\n */\nexport interface SignalFormsConfig {\n /** A map of CSS class names to predicate functions that determine when to apply them. */\n classes?: {[className: string]: (state: FormField<unknown>) => boolean};\n}\n\n/**\n * Provides configuration options for signal forms.\n *\n * @experimental 21.0.1\n */\nexport function provideSignalFormsConfig(config: SignalFormsConfig): Provider[] {\n return [{provide: SIGNAL_FORMS_CONFIG, useValue: config}];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {SignalFormsErrorCode} from '../errors';\n\nimport {\n ControlValueAccessor,\n Validators,\n type AbstractControl,\n type FormControlStatus,\n type ValidationErrors,\n type ValidatorFn,\n} from '@angular/forms';\nimport type {FieldState} from '../api/types';\n\n// TODO: Also consider supporting (if possible):\n// - hasError\n// - getError\n// - reset\n// - name\n// - path\n// - markAs[Touched,Dirty,etc.]\n\n/**\n * Represents a combination of `NgControl` and `AbstractControl`.\n *\n * Note: We have this separate interface, rather than implementing the relevant parts of the two\n * controls with something like `InteropNgControl implements Pick<NgControl, ...>, Pick<AbstractControl, ...>`\n * because it confuses the internal JS minifier which can cause collisions in field names.\n */\ninterface CombinedControl {\n value: any;\n valid: boolean;\n invalid: boolean;\n touched: boolean;\n untouched: boolean;\n disabled: boolean;\n enabled: boolean;\n errors: ValidationErrors | null;\n pristine: boolean;\n dirty: boolean;\n status: FormControlStatus;\n control: AbstractControl<any, any>;\n valueAccessor: ControlValueAccessor | null;\n hasValidator(validator: ValidatorFn): boolean;\n updateValueAndValidity(): void;\n}\n\n/**\n * A fake version of `NgControl` provided by the `Field` directive. This allows interoperability\n * with a wider range of components designed to work with reactive forms, in particular ones that\n * inject the `NgControl`. The interop control does not implement *all* properties and methods of\n * the real `NgControl`, but does implement some of the most commonly used ones that have a clear\n * equivalent in signal forms.\n */\nexport class InteropNgControl implements CombinedControl {\n constructor(protected field: () => FieldState<unknown>) {}\n\n readonly control: AbstractControl<any, any> = this as unknown as AbstractControl<any, any>;\n\n get value(): any {\n return this.field().value();\n }\n\n get valid(): boolean {\n return this.field().valid();\n }\n\n get invalid(): boolean {\n return this.field().invalid();\n }\n\n get pending(): boolean | null {\n return this.field().pending();\n }\n\n get disabled(): boolean {\n return this.field().disabled();\n }\n\n get enabled(): boolean {\n return !this.field().disabled();\n }\n\n get errors(): ValidationErrors | null {\n const errors = this.field().errors();\n if (errors.length === 0) {\n return null;\n }\n const errObj: ValidationErrors = {};\n for (const error of errors) {\n errObj[error.kind] = error;\n }\n return errObj;\n }\n\n get pristine(): boolean {\n return !this.field().dirty();\n }\n\n get dirty(): boolean {\n return this.field().dirty();\n }\n\n get touched(): boolean {\n return this.field().touched();\n }\n\n get untouched(): boolean {\n return !this.field().touched();\n }\n\n get status(): FormControlStatus {\n if (this.field().disabled()) {\n return 'DISABLED';\n }\n if (this.field().valid()) {\n return 'VALID';\n }\n if (this.field().invalid()) {\n return 'INVALID';\n }\n if (this.field().pending()) {\n return 'PENDING';\n }\n throw new RuntimeError(\n SignalFormsErrorCode.UNKNOWN_STATUS,\n ngDevMode && 'Unknown form control status',\n );\n }\n\n valueAccessor: ControlValueAccessor | null = null;\n\n hasValidator(validator: ValidatorFn): boolean {\n // This addresses a common case where users look for the presence of `Validators.required` to\n // determine whether or not to show a required \"*\" indicator in the UI.\n if (validator === Validators.required) {\n return this.field().required();\n }\n return false;\n }\n\n updateValueAndValidity() {\n // No-op since value and validity are always up to date in signal forms.\n // We offer this method so that reactive forms code attempting to call it doesn't error.\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n computed,\n ɵɵcontrolCreate as createControlBinding,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n Injector,\n input,\n ɵRuntimeError as RuntimeError,\n signal,\n untracked,\n ɵcontrolUpdate as updateControlBinding,\n ɵCONTROL,\n ɵInteropControl,\n type ɵFormFieldBindingOptions,\n type ɵFormFieldDirective,\n} from '@angular/core';\nimport {NG_VALUE_ACCESSOR, NgControl} from '@angular/forms';\nimport {InteropNgControl} from '../controls/interop_ng_control';\nimport {SignalFormsErrorCode} from '../errors';\nimport {SIGNAL_FORMS_CONFIG} from '../field/di';\nimport type {FieldNode} from '../field/node';\nimport type {FieldTree} from './types';\n\nexport interface FormFieldBindingOptions extends ɵFormFieldBindingOptions {\n /**\n * Focuses the binding.\n *\n * If not specified, Signal Forms will attempt to focus the host element of the `FormField` when\n * asked to focus this binding.\n */\n focus?: VoidFunction;\n}\n\n/**\n * Lightweight DI token provided by the {@link FormField} directive.\n *\n * @category control\n * @experimental 21.0.0\n */\nexport const FORM_FIELD = new InjectionToken<FormField<unknown>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'FORM_FIELD' : '',\n);\n\n/**\n * Instructions for dynamically binding a {@link FormField} to a form control.\n */\nconst controlInstructions = {\n create: createControlBinding,\n update: updateControlBinding,\n} as const;\n\n/**\n * Binds a form `FieldTree` to a UI control that edits it. A UI control can be one of several things:\n * 1. A native HTML input or textarea\n * 2. A signal forms custom control that implements `FormValueControl` or `FormCheckboxControl`\n * 3. A component that provides a `ControlValueAccessor`. This should only be used for backwards\n * compatibility with reactive forms. Prefer options (1) and (2).\n *\n * This directive has several responsibilities:\n * 1. Two-way binds the field state's value with the UI control's value\n * 2. Binds additional forms related state on the field state to the UI control (disabled, required, etc.)\n * 3. Relays relevant events on the control to the field state (e.g. marks touched on blur)\n * 4. Provides a fake `NgControl` that implements a subset of the features available on the\n * reactive forms `NgControl`. This is provided to improve interoperability with controls\n * designed to work with reactive forms. It should not be used by controls written for signal\n * forms.\n *\n * @category control\n * @experimental 21.0.0\n */\n@Directive({\n selector: '[formField]',\n providers: [\n {provide: FORM_FIELD, useExisting: FormField},\n {provide: NgControl, useFactory: () => inject(FormField).getOrCreateNgControl()},\n ],\n})\n// This directive should `implements ɵFormFieldDirective<T>`, but actually adding that breaks people's\n// builds because part of the public API is marked `@internal` and stripped.\n// Instead we have an type check below that enforces this in a non-breaking way.\nexport class FormField<T> {\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly injector = inject(Injector);\n readonly formField = input.required<FieldTree<T>>();\n readonly state = computed(() => this.formField()());\n private readonly bindingOptions = signal<FormFieldBindingOptions | undefined>(undefined);\n\n readonly [ɵCONTROL] = controlInstructions;\n\n private config = inject(SIGNAL_FORMS_CONFIG, {optional: true});\n /** @internal */\n readonly classes = Object.entries(this.config?.classes ?? {}).map(\n ([className, computation]) =>\n [className, computed(() => computation(this as FormField<unknown>))] as const,\n );\n\n /** Any `ControlValueAccessor` instances provided on the host element. */\n private readonly controlValueAccessors = inject(NG_VALUE_ACCESSOR, {optional: true, self: true});\n\n /** A lazily instantiated fake `NgControl`. */\n private interopNgControl: InteropNgControl | undefined;\n\n /**\n * A `ControlValueAccessor`, if configured, for the host component.\n *\n * @internal\n */\n get ɵinteropControl(): ɵInteropControl | undefined {\n return this.controlValueAccessors?.[0] ?? this.interopNgControl?.valueAccessor ?? undefined;\n }\n\n /** Lazily instantiates a fake `NgControl` for this form field. */\n protected getOrCreateNgControl(): InteropNgControl {\n return (this.interopNgControl ??= new InteropNgControl(this.state));\n }\n\n /**\n * Registers this `FormField` as a binding on its associated `FieldState`.\n *\n * This method should be called at most once for a given `FormField`. A `FormField` placed on a\n * custom control (`FormUiControl`) automatically registers that custom control as a binding.\n */\n registerAsBinding(bindingOptions?: FormFieldBindingOptions) {\n if (untracked(this.bindingOptions)) {\n throw new RuntimeError(\n SignalFormsErrorCode.BINDING_ALREADY_REGISTERED,\n ngDevMode && 'FormField already registered as a binding',\n );\n }\n\n this.bindingOptions.set(bindingOptions);\n // Register this control on the field state it is currently bound to. We do this at the end of\n // initialization so that it only runs if we are actually syncing with this control\n // (as opposed to just passing the field state through to its `formField` input).\n effect(\n (onCleanup) => {\n const fieldNode = this.state() as unknown as FieldNode;\n fieldNode.nodeState.formFieldBindings.update((controls) => [\n ...controls,\n this as FormField<unknown>,\n ]);\n onCleanup(() => {\n fieldNode.nodeState.formFieldBindings.update((controls) =>\n controls.filter((c) => c !== this),\n );\n });\n },\n {injector: this.injector},\n );\n }\n\n /** Focuses this UI control. */\n focus() {\n const bindingOptions = untracked(this.bindingOptions);\n if (bindingOptions?.focus) {\n bindingOptions.focus();\n } else {\n this.element.focus();\n }\n }\n}\n\n// We can't add `implements ɵFormFieldDirective<T>` to `Field` even though it should conform to the interface.\n// Instead we enforce it here through some utility types.\ntype Check<T extends true> = T;\ntype FormFieldImplementsɵFormFieldDirective = Check<\n FormField<any> extends ɵFormFieldDirective<any> ? true : false\n>;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {FieldContext, LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally disable it. A disabled field does not contribute to the\n * validation, touched/dirty, or other state of its parent field.\n *\n * @param path The target path to add the disabled logic to.\n * @param logic A reactive function that returns `true` (or a string reason) when the field is disabled,\n * and `false` when it is not disabled.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function disabled<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic?: string | NoInfer<LogicFn<TValue, boolean | string, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addDisabledReasonRule((ctx) => {\n let result: boolean | string = true;\n if (typeof logic === 'string') {\n result = logic;\n } else if (logic) {\n result = logic(ctx as FieldContext<TValue, TPathKind>);\n }\n if (typeof result === 'string') {\n return {fieldTree: ctx.fieldTree, message: result};\n }\n return result ? {fieldTree: ctx.fieldTree} : undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally hide it. A hidden field does not contribute to the\n * validation, touched/dirty, or other state of its parent field.\n *\n * If a field may be hidden it is recommended to guard it with an `@if` in the template:\n * ```\n * @if (!email().hidden()) {\n * <label for=\"email\">Email</label>\n * <input id=\"email\" type=\"email\" [control]=\"email\" />\n * }\n * ```\n *\n * @param path The target path to add the hidden logic to.\n * @param logic A reactive function that returns `true` when the field is hidden.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function hidden<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<LogicFn<TValue, boolean, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addHiddenRule(logic);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally make it readonly. A readonly field does not contribute to\n * the validation, touched/dirty, or other state of its parent field.\n *\n * @param path The target path to make readonly.\n * @param logic A reactive function that returns `true` when the field is readonly.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function readonly<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<LogicFn<TValue, boolean, TPathKind>> = () => true,\n) {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addReadonlyRule(logic);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, OneOrMany, PathKind, type FieldContext} from '../../types';\nimport {ValidationError} from './validation_errors';\n\n/** Represents a value that has a length or size, such as an array or string, or set. */\nexport type ValueWithLengthOrSize = {length: number} | {size: number};\n\n/** Common options available on the standard validators. */\nexport type BaseValidatorConfig<TValue, TPathKind extends PathKind = PathKind.Root> =\n | {\n /** A user-facing error message to include with the error. */\n message?: string | LogicFn<TValue, string, TPathKind>;\n error?: never;\n }\n | {\n /**\n * Custom validation error(s) to report instead of the default,\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n */\n error?: OneOrMany<ValidationError> | LogicFn<TValue, OneOrMany<ValidationError>, TPathKind>;\n message?: never;\n };\n\n/** Gets the length or size of the given value. */\nexport function getLengthOrSize(value: ValueWithLengthOrSize) {\n const v = value as {length: number; size: number};\n return typeof v.length === 'number' ? v.length : v.size;\n}\n\n/**\n * Gets the value for an option that may be either a static value or a logic function that produces\n * the option value.\n *\n * @param opt The option from BaseValidatorConfig.\n * @param ctx The current FieldContext.\n * @returns The value for the option.\n */\nexport function getOption<TOption, TValue, TPathKind extends PathKind = PathKind.Root>(\n opt: Exclude<TOption, Function> | LogicFn<TValue, TOption, TPathKind> | undefined,\n ctx: FieldContext<TValue, TPathKind>,\n): TOption | undefined {\n return opt instanceof Function ? opt(ctx) : opt;\n}\n\n/**\n * Checks if the given value is considered empty. Empty values are: null, undefined, '', false, NaN.\n */\nexport function isEmpty(value: unknown): boolean {\n if (typeof value === 'number') {\n return isNaN(value);\n }\n return value === '' || value === false || value == null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport type {\n FieldContext,\n FieldValidator,\n PathKind,\n SchemaPath,\n SchemaPathRules,\n} from '../../types';\n\n/**\n * Adds logic to a field to determine if the field has validation errors.\n *\n * @param path The target path to add the validation logic to.\n * @param logic A `Validator` that returns the current validation errors.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function validate<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<FieldValidator<TValue, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addSyncErrorRule((ctx) => {\n return addDefaultField(logic(ctx as FieldContext<TValue, TPathKind>), ctx.fieldTree);\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {StandardSchemaV1} from '@standard-schema/spec';\nimport {FieldTree} from '../../types';\n\n/**\n * Options used to create a `ValidationError`.\n */\ninterface ValidationErrorOptions {\n /** Human readable error message. */\n message?: string;\n}\n\n/**\n * A type that requires the given type `T` to have a `field` property.\n * @template T The type to add a `field` to.\n *\n * @experimental 21.0.0\n */\nexport type WithField<T> = T & {fieldTree: FieldTree<unknown>};\n\n/**\n * A type that allows the given type `T` to optionally have a `field` property.\n * @template T The type to optionally add a `field` to.\n *\n * @experimental 21.0.0\n */\nexport type WithOptionalField<T> = Omit<T, 'fieldTree'> & {fieldTree?: FieldTree<unknown>};\n\n/**\n * A type that ensures the given type `T` does not have a `field` property.\n * @template T The type to remove the `field` from.\n *\n * @experimental 21.0.0\n */\nexport type WithoutField<T> = T & {fieldTree: never};\n\n/**\n * Create a required error associated with the target field\n * @param options The validation error options\n *\n * @experimental 21.0.0\n */\nexport function requiredError(options: WithField<ValidationErrorOptions>): RequiredValidationError;\n/**\n * Create a required error\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function requiredError(\n options?: ValidationErrorOptions,\n): WithoutField<RequiredValidationError>;\nexport function requiredError(\n options?: ValidationErrorOptions,\n): WithOptionalField<RequiredValidationError> {\n return new RequiredValidationError(options);\n}\n\n/**\n * Create a min value error associated with the target field\n * @param min The min value constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minError(\n min: number,\n options: WithField<ValidationErrorOptions>,\n): MinValidationError;\n/**\n * Create a min value error\n * @param min The min value constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minError(\n min: number,\n options?: ValidationErrorOptions,\n): WithoutField<MinValidationError>;\nexport function minError(\n min: number,\n options?: ValidationErrorOptions,\n): WithOptionalField<MinValidationError> {\n return new MinValidationError(min, options);\n}\n\n/**\n * Create a max value error associated with the target field\n * @param max The max value constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxError(\n max: number,\n options: WithField<ValidationErrorOptions>,\n): MaxValidationError;\n/**\n * Create a max value error\n * @param max The max value constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxError(\n max: number,\n options?: ValidationErrorOptions,\n): WithoutField<MaxValidationError>;\nexport function maxError(\n max: number,\n options?: ValidationErrorOptions,\n): WithOptionalField<MaxValidationError> {\n return new MaxValidationError(max, options);\n}\n\n/**\n * Create a minLength error associated with the target field\n * @param minLength The minLength constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLengthError(\n minLength: number,\n options: WithField<ValidationErrorOptions>,\n): MinLengthValidationError;\n/**\n * Create a minLength error\n * @param minLength The minLength constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLengthError(\n minLength: number,\n options?: ValidationErrorOptions,\n): WithoutField<MinLengthValidationError>;\nexport function minLengthError(\n minLength: number,\n options?: ValidationErrorOptions,\n): WithOptionalField<MinLengthValidationError> {\n return new MinLengthValidationError(minLength, options);\n}\n\n/**\n * Create a maxLength error associated with the target field\n * @param maxLength The maxLength constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLengthError(\n maxLength: number,\n options: WithField<ValidationErrorOptions>,\n): MaxLengthValidationError;\n/**\n * Create a maxLength error\n * @param maxLength The maxLength constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLengthError(\n maxLength: number,\n options?: ValidationErrorOptions,\n): WithoutField<MaxLengthValidationError>;\nexport function maxLengthError(\n maxLength: number,\n options?: ValidationErrorOptions,\n): WithOptionalField<MaxLengthValidationError> {\n return new MaxLengthValidationError(maxLength, options);\n}\n\n/**\n * Create a pattern matching error associated with the target field\n * @param pattern The violated pattern\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function patternError(\n pattern: RegExp,\n options: WithField<ValidationErrorOptions>,\n): PatternValidationError;\n/**\n * Create a pattern matching error\n * @param pattern The violated pattern\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function patternError(\n pattern: RegExp,\n options?: ValidationErrorOptions,\n): WithoutField<PatternValidationError>;\nexport function patternError(\n pattern: RegExp,\n options?: ValidationErrorOptions,\n): WithOptionalField<PatternValidationError> {\n return new PatternValidationError(pattern, options);\n}\n\n/**\n * Create an email format error associated with the target field\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function emailError(options: WithField<ValidationErrorOptions>): EmailValidationError;\n/**\n * Create an email format error\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function emailError(options?: ValidationErrorOptions): WithoutField<EmailValidationError>;\nexport function emailError(\n options?: ValidationErrorOptions,\n): WithOptionalField<EmailValidationError> {\n return new EmailValidationError(options);\n}\n\n/**\n * Create a standard schema issue error associated with the target field\n * @param issue The standard schema issue\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options: WithField<ValidationErrorOptions>,\n): StandardSchemaValidationError;\n/**\n * Create a standard schema issue error\n * @param issue The standard schema issue\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n): WithoutField<StandardSchemaValidationError>;\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n): WithOptionalField<StandardSchemaValidationError> {\n return new StandardSchemaValidationError(issue, options);\n}\n\n/**\n * Common interface for all validation errors.\n *\n * This can be returned from validators.\n *\n * It's also used by the creation functions to create an instance\n * (e.g. `requiredError`, `minError`, etc.).\n *\n * @see [Signal Form Validation](guide/forms/signals/validation)\n * @see [Signal Form Validation Errors](guide/forms/signals/validation#validation-errors)\n * @category validation\n * @experimental 21.0.0\n */\nexport interface ValidationError {\n /** Identifies the kind of error. */\n readonly kind: string;\n /** Human readable error message. */\n readonly message?: string;\n}\n\nexport declare namespace ValidationError {\n /**\n * Validation error with a field.\n *\n * This is returned from field state, e.g., catField.errors() would be of a list of errors with\n * `field: catField` bound to state.\n */\n export interface WithField extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree: FieldTree<unknown>;\n }\n\n /**\n * Validation error with optional field.\n *\n * This is generally used in places where the result might have a field.\n * e.g., as a result of a `validateTree`, or when handling form submission.\n */\n export interface WithOptionalField extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree?: FieldTree<unknown>;\n }\n\n /**\n * Validation error with no field.\n *\n * This is used to strongly enforce that fields are not allowed in validation result.\n */\n export interface WithoutField extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree?: never;\n }\n}\n\n/**\n * Internal version of `NgValidationError`, we create this separately so we can change its type on\n * the exported version to a type union of the possible sub-classes.\n *\n * @experimental 21.0.0\n */\nabstract class _NgValidationError implements ValidationError {\n /** Brand the class to avoid Typescript structural matching */\n private __brand = undefined;\n\n /** Identifies the kind of error. */\n readonly kind: string = '';\n\n /** The field associated with this error. */\n readonly fieldTree!: FieldTree<unknown>;\n\n /** Human readable error message. */\n readonly message?: string;\n\n constructor(options?: ValidationErrorOptions) {\n if (options) {\n Object.assign(this, options);\n }\n }\n}\n\n/**\n * An error used to indicate that a required field is empty.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class RequiredValidationError extends _NgValidationError {\n override readonly kind = 'required';\n}\n\n/**\n * An error used to indicate that a value is lower than the minimum allowed.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MinValidationError extends _NgValidationError {\n override readonly kind = 'min';\n\n constructor(\n readonly min: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is higher than the maximum allowed.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MaxValidationError extends _NgValidationError {\n override readonly kind = 'max';\n\n constructor(\n readonly max: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is shorter than the minimum allowed length.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MinLengthValidationError extends _NgValidationError {\n override readonly kind = 'minLength';\n\n constructor(\n readonly minLength: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is longer than the maximum allowed length.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MaxLengthValidationError extends _NgValidationError {\n override readonly kind = 'maxLength';\n\n constructor(\n readonly maxLength: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value does not match the required pattern.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class PatternValidationError extends _NgValidationError {\n override readonly kind = 'pattern';\n\n constructor(\n readonly pattern: RegExp,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is not a valid email.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class EmailValidationError extends _NgValidationError {\n override readonly kind = 'email';\n}\n\n/**\n * An error used to indicate an issue validating against a standard schema.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class StandardSchemaValidationError extends _NgValidationError {\n override readonly kind = 'standardSchema';\n\n constructor(\n readonly issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * The base class for all built-in, non-custom errors. This class can be used to check if an error\n * is one of the standard kinds, allowing you to switch on the kind to further narrow the type.\n *\n * @example\n * ```ts\n * const f = form(...);\n * for (const e of form().errors()) {\n * if (e instanceof NgValidationError) {\n * switch(e.kind) {\n * case 'required':\n * console.log('This is required!');\n * break;\n * case 'min':\n * console.log(`Must be at least ${e.min}`);\n * break;\n * ...\n * }\n * }\n * }\n * ```\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport const NgValidationError: abstract new () => NgValidationError = _NgValidationError as any;\nexport type NgValidationError =\n | RequiredValidationError\n | MinValidationError\n | MaxValidationError\n | MinLengthValidationError\n | MaxLengthValidationError\n | PatternValidationError\n | EmailValidationError\n | StandardSchemaValidationError;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {emailError} from './validation_errors';\n\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n * punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n * `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n * periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n * - Disallow `local-part` to begin or end with a period (`.`).\n * - Disallow `local-part` length to exceed 64 characters.\n * - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP =\n /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * Binds a validator to the given path that requires the value to match the standard email format.\n * This function can only be called on string paths.\n *\n * @param path Path of the field to validate\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.email()`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Email Validation](guide/forms/signals/validation#email)\n * @category validation\n * @experimental 21.0.0\n */\nexport function email<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: BaseValidatorConfig<string, TPathKind>,\n) {\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n if (!EMAIL_REGEXP.test(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return emailError({message: getOption(config?.message, ctx)});\n }\n }\n\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, MAX, metadata} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {maxError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be less than or equal to the\n * given `maxValue`.\n * This function can only be called on number paths.\n * In addition to binding a validator, this function adds `MAX` property to the field.\n *\n * @param path Path of the field to validate\n * @param maxValue The maximum value, or a LogicFn that returns the maximum value.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.max(maxValue)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Max Validation](guide/forms/signals/validation#min-and-max)\n * @category validation\n * @experimental 21.0.0\n */\nexport function max<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<number | string | null, SchemaPathRules.Supported, TPathKind>,\n maxValue: number | LogicFn<number | string | null, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<number | string | null, TPathKind>,\n) {\n const MAX_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof maxValue === 'number' ? maxValue : maxValue(ctx),\n );\n metadata(path, MAX, ({state}) => state.metadata(MAX_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const max = ctx.state.metadata(MAX_MEMO)!();\n if (max === undefined || Number.isNaN(max)) {\n return undefined;\n }\n const value = ctx.value();\n const numValue = !value && value !== 0 ? NaN : Number(value); // Treat `''` and `null` as `NaN`\n if (numValue > max) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return maxError(max, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, MAX_LENGTH, metadata} from '../metadata';\nimport {\n BaseValidatorConfig,\n getLengthOrSize,\n getOption,\n isEmpty,\n ValueWithLengthOrSize,\n} from './util';\nimport {validate} from './validate';\nimport {maxLengthError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the length of the value to be less than or\n * equal to the given `maxLength`.\n * This function can only be called on string or array paths.\n * In addition to binding a validator, this function adds `MAX_LENGTH` property to the field.\n *\n * @param path Path of the field to validate\n * @param maxLength The maximum length, or a LogicFn that returns the maximum length.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.maxLength(maxLength)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Max Length Validation](guide/forms/signals/validation#minlength-and-maxlength)\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLength<\n TValue extends ValueWithLengthOrSize,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n maxLength: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MAX_LENGTH_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof maxLength === 'number' ? maxLength : maxLength(ctx),\n );\n metadata(path, MAX_LENGTH, ({state}) => state.metadata(MAX_LENGTH_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const maxLength = ctx.state.metadata(MAX_LENGTH_MEMO)!();\n if (maxLength === undefined) {\n return undefined;\n }\n if (getLengthOrSize(ctx.value()) > maxLength) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return maxLengthError(maxLength, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, MIN} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {minError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be greater than or equal to\n * the given `minValue`.\n * This function can only be called on number paths.\n * In addition to binding a validator, this function adds `MIN` property to the field.\n *\n * @param path Path of the field to validate\n * @param minValue The minimum value, or a LogicFn that returns the minimum value.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.min(minValue)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Min Validation](guide/forms/signals/validation#min-and-max)\n * @category validation\n * @experimental 21.0.0\n */\nexport function min<\n TValue extends number | string | null,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n minValue: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MIN_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof minValue === 'number' ? minValue : minValue(ctx),\n );\n metadata(path, MIN, ({state}) => state.metadata(MIN_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const min = ctx.state.metadata(MIN_MEMO)!();\n if (min === undefined || Number.isNaN(min)) {\n return undefined;\n }\n const value = ctx.value();\n const numValue = !value && value !== 0 ? NaN : Number(value); // Treat `''` and `null` as `NaN`\n if (numValue < min) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return minError(min, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, MIN_LENGTH} from '../metadata';\nimport {\n BaseValidatorConfig,\n getLengthOrSize,\n getOption,\n isEmpty,\n ValueWithLengthOrSize,\n} from './util';\nimport {validate} from './validate';\nimport {minLengthError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the length of the value to be greater than or\n * equal to the given `minLength`.\n * This function can only be called on string or array paths.\n * In addition to binding a validator, this function adds `MIN_LENGTH` property to the field.\n *\n * @param path Path of the field to validate\n * @param minLength The minimum length, or a LogicFn that returns the minimum length.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.minLength(minLength)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Min Length Validation](guide/forms/signals/validation#minlength-and-maxlength)\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLength<\n TValue extends ValueWithLengthOrSize,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n minLength: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MIN_LENGTH_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof minLength === 'number' ? minLength : minLength(ctx),\n );\n metadata(path, MIN_LENGTH, ({state}) => state.metadata(MIN_LENGTH_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const minLength = ctx.state.metadata(MIN_LENGTH_MEMO)!();\n if (minLength === undefined) {\n return undefined;\n }\n if (getLengthOrSize(ctx.value()) < minLength) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return minLengthError(minLength, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, PATTERN} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {patternError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to match a specific regex pattern.\n * This function can only be called on string paths.\n * In addition to binding a validator, this function adds `PATTERN` property to the field.\n *\n * @param path Path of the field to validate\n * @param pattern The RegExp pattern to match, or a LogicFn that returns the RegExp pattern.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.pattern(pattern)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Pattern Validation](guide/forms/signals/validation#pattern)\n * @category validation\n * @experimental 21.0.0\n */\nexport function pattern<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n pattern: RegExp | LogicFn<string | undefined, RegExp | undefined, TPathKind>,\n config?: BaseValidatorConfig<string, TPathKind>,\n) {\n const PATTERN_MEMO = metadata(path, createMetadataKey<RegExp | undefined>(), (ctx) =>\n pattern instanceof RegExp ? pattern : pattern(ctx),\n );\n metadata(path, PATTERN, ({state}) => state.metadata(PATTERN_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const pattern = ctx.state.metadata(PATTERN_MEMO)!();\n if (pattern === undefined) {\n return undefined;\n }\n if (!pattern.test(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return patternError(pattern, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, REQUIRED} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {requiredError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be non-empty.\n * This function can only be called on any type of path.\n * In addition to binding a validator, this function adds `REQUIRED` property to the field.\n *\n * @param path Path of the field to validate\n * @param config Optional, allows providing any of the following options:\n * - `message`: A user-facing message for the error.\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.required()`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * - `when`: A function that receives the `FieldContext` and returns true if the field is required\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Required Validation](guide/forms/signals/validation#required)\n * @category validation\n * @experimental 21.0.0\n */\nexport function required<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind> & {\n when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>;\n },\n): void {\n const REQUIRED_MEMO = metadata(path, createMetadataKey<boolean>(), (ctx) =>\n config?.when ? config.when(ctx) : true,\n );\n metadata(path, REQUIRED, ({state}) => state.metadata(REQUIRED_MEMO)!()!);\n validate(path, (ctx) => {\n if (ctx.state.metadata(REQUIRED_MEMO)!() && isEmpty(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return requiredError({message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ResourceRef, Signal} from '@angular/core';\nimport {FieldNode} from '../../../field/node';\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport {\n FieldContext,\n PathKind,\n SchemaPath,\n SchemaPathRules,\n TreeValidationResult,\n} from '../../types';\nimport {createManagedMetadataKey, metadata} from '../metadata';\n\n/**\n * A function that takes the result of an async operation and the current field context, and maps it\n * to a list of validation errors.\n *\n * @param result The result of the async operation.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the result of the async operation.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the async operation\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @experimental 21.0.0\n */\nexport type MapToErrorsFn<TValue, TResult, TPathKind extends PathKind = PathKind.Root> = (\n result: TResult,\n ctx: FieldContext<TValue, TPathKind>,\n) => TreeValidationResult;\n\n/**\n * Options that indicate how to create a resource for async validation for a field,\n * and map its result to validation errors.\n *\n * @template TValue The type of value stored in the field being validated.\n * @template TParams The type of parameters to the resource.\n * @template TResult The type of result returned by the resource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport interface AsyncValidatorOptions<\n TValue,\n TParams,\n TResult,\n TPathKind extends PathKind = PathKind.Root,\n> {\n /**\n * A function that receives the field context and returns the params for the resource.\n *\n * @param ctx The field context for the field being validated.\n * @returns The params for the resource.\n */\n readonly params: (ctx: FieldContext<TValue, TPathKind>) => TParams;\n\n /**\n * A function that receives the resource params and returns a resource of the given params.\n * The given params should be used as is to create the resource.\n * The forms system will report the params as `undefined` when this validation doesn't need to be run.\n *\n * @param params The params to use for constructing the resource\n * @returns A reference to the constructed resource.\n */\n readonly factory: (params: Signal<TParams | undefined>) => ResourceRef<TResult | undefined>;\n /**\n * A function to handle errors thrown by httpResource (HTTP errors, network errors, etc.).\n * Receives the error and the field context, returns a list of validation errors.\n */\n readonly onError: (error: unknown, ctx: FieldContext<TValue, TPathKind>) => TreeValidationResult;\n /**\n * A function that takes the resource result, and the current field context and maps it to a list\n * of validation errors.\n *\n * @param result The resource result.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the resource result.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n */\n readonly onSuccess: MapToErrorsFn<TValue, TResult, TPathKind>;\n}\n\n/**\n * Adds async validation to the field corresponding to the given path based on a resource.\n * Async validation for a field only runs once all synchronous validation is passing.\n *\n * @param path A path indicating the field to bind the async validation logic to.\n * @param opts The async validation options.\n * @template TValue The type of value stored in the field being validated.\n * @template TParams The type of parameters to the resource.\n * @template TResult The type of result returned by the resource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateAsync<TValue, TParams, TResult, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n opts: AsyncValidatorOptions<TValue, TParams, TResult, TPathKind>,\n): void {\n assertPathIsCurrent(path);\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n\n const RESOURCE = createManagedMetadataKey<ReturnType<typeof opts.factory>, TParams | undefined>(\n opts.factory,\n );\n metadata(path, RESOURCE, (ctx) => {\n const node = ctx.stateOf(path) as FieldNode;\n const validationState = node.validationState;\n if (validationState.shouldSkipValidation() || !validationState.syncValid()) {\n return undefined;\n }\n return opts.params(ctx);\n });\n\n pathNode.builder.addAsyncErrorRule((ctx) => {\n const res = ctx.state.metadata(RESOURCE)!;\n let errors;\n switch (res.status()) {\n case 'idle':\n return undefined;\n case 'loading':\n case 'reloading':\n return 'pending';\n case 'resolved':\n case 'local':\n if (!res.hasValue()) {\n return undefined;\n }\n errors = opts.onSuccess(res.value()!, ctx as FieldContext<TValue, TPathKind>);\n return addDefaultField(errors, ctx.fieldTree);\n case 'error':\n errors = opts.onError(res.error(), ctx as FieldContext<TValue, TPathKind>);\n return addDefaultField(errors, ctx.fieldTree);\n }\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport type {FieldContext, PathKind, SchemaPath, SchemaPathRules, TreeValidator} from '../../types';\n\n/**\n * Adds logic to a field to determine if the field or any of its child fields has validation errors.\n *\n * @param path The target path to add the validation logic to.\n * @param logic A `TreeValidator` that returns the current validation errors.\n * Errors returned by the validator may specify a target field to indicate an error on a child field.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function validateTree<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<TreeValidator<TValue, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addSyncTreeErrorRule((ctx) =>\n addDefaultField(logic(ctx as FieldContext<TValue, TPathKind>), ctx.fieldTree),\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {resource, ɵisPromise} from '@angular/core';\nimport type {StandardSchemaV1} from '@standard-schema/spec';\nimport {addDefaultField} from '../../../field/validation';\nimport type {FieldTree, SchemaPath, SchemaPathTree} from '../../types';\nimport {createMetadataKey, metadata} from '../metadata';\nimport {validateAsync} from './validate_async';\nimport {validateTree} from './validate_tree';\nimport {standardSchemaError, StandardSchemaValidationError} from './validation_errors';\n\n/**\n * Utility type that removes a string index key when its value is `unknown`,\n * i.e. `{[key: string]: unknown}`. It allows specific string keys to pass through, even if their\n * value is `unknown`, e.g. `{key: unknown}`.\n *\n * @experimental 21.0.0\n */\nexport type RemoveStringIndexUnknownKey<K, V> = string extends K\n ? unknown extends V\n ? never\n : K\n : K;\n\n/**\n * Utility type that recursively ignores unknown string index properties on the given object.\n * We use this on the `TSchema` type in `validateStandardSchema` in order to accommodate Zod's\n * `looseObject` which includes `{[key: string]: unknown}` as part of the type.\n *\n * @experimental 21.0.0\n */\nexport type IgnoreUnknownProperties<T> =\n T extends Record<PropertyKey, unknown>\n ? {\n [K in keyof T as RemoveStringIndexUnknownKey<K, T[K]>]: IgnoreUnknownProperties<T[K]>;\n }\n : T;\n\n/**\n * Validates a field using a `StandardSchemaV1` compatible validator (e.g. a Zod validator).\n *\n * See https://github.com/standard-schema/standard-schema for more about standard schema.\n *\n * @param path The `FieldPath` to the field to validate.\n * @param schema The standard schema compatible validator to use for validation.\n * @template TSchema The type validated by the schema. This may be either the full `TValue` type,\n * or a partial of it.\n * @template TValue The type of value stored in the field being validated.\n *\n * @see [Signal Form Schema Validation](guide/forms/signals/validation#integration-with-schema-validation-libraries)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateStandardSchema<TSchema, TModel extends IgnoreUnknownProperties<TSchema>>(\n path: SchemaPath<TModel> & SchemaPathTree<TModel>,\n schema: StandardSchemaV1<TSchema>,\n) {\n // We create both a sync and async validator because the standard schema validator can return\n // either a sync result or a Promise, and we need to handle both cases. The sync validator\n // handles the sync result, and the async validator handles the Promise.\n // We memoize the result of the validation function here, so that it is only run once for both\n // validators, it can then be passed through both sync & async validation.\n type Result = StandardSchemaV1.Result<TSchema> | Promise<StandardSchemaV1.Result<TSchema>>;\n const VALIDATOR_MEMO = metadata(\n path as SchemaPath<TModel>,\n createMetadataKey<Result>(),\n ({value}) => {\n return schema['~standard'].validate(value());\n },\n );\n\n validateTree<TModel>(path, ({state, fieldTreeOf}) => {\n // Skip sync validation if the result is a Promise.\n const result = state.metadata(VALIDATOR_MEMO)!();\n if (ɵisPromise(result)) {\n return [];\n }\n return (\n result?.issues?.map((issue) =>\n standardIssueToFormTreeError(fieldTreeOf<TModel>(path), issue),\n ) ?? []\n );\n });\n\n validateAsync<\n TModel,\n Promise<StandardSchemaV1.Result<TSchema>> | undefined,\n readonly StandardSchemaV1.Issue[]\n >(path, {\n params: ({state}) => {\n // Skip async validation if the result is *not* a Promise.\n const result = state.metadata(VALIDATOR_MEMO)!();\n return ɵisPromise(result) ? result : undefined;\n },\n factory: (params) => {\n return resource({\n params,\n loader: async ({params}) => (await params)?.issues ?? [],\n });\n },\n onSuccess: (issues, {fieldTreeOf}) => {\n return issues.map((issue) => standardIssueToFormTreeError(fieldTreeOf<TModel>(path), issue));\n },\n onError: () => {},\n });\n}\n\n/**\n * Converts a `StandardSchemaV1.Issue` to a `FormTreeError`.\n *\n * @param fieldTree The root field to which the issue's path is relative.\n * @param issue The `StandardSchemaV1.Issue` to convert.\n * @returns A `ValidationError` representing the issue.\n */\nfunction standardIssueToFormTreeError(\n fieldTree: FieldTree<unknown>,\n issue: StandardSchemaV1.Issue,\n): StandardSchemaValidationError {\n let target = fieldTree as FieldTree<Record<PropertyKey, unknown>>;\n for (const pathPart of issue.path ?? []) {\n const pathKey = typeof pathPart === 'object' ? pathPart.key : pathPart;\n target = target[pathKey] as FieldTree<Record<PropertyKey, unknown>>;\n }\n return addDefaultField(standardSchemaError(issue, {message: issue.message}), target);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {httpResource, HttpResourceOptions, HttpResourceRequest} from '@angular/common/http';\nimport {Signal} from '@angular/core';\nimport {\n FieldContext,\n SchemaPath,\n PathKind,\n TreeValidationResult,\n SchemaPathRules,\n} from '../../types';\nimport {MapToErrorsFn, validateAsync} from './validate_async';\n\n/**\n * Options that indicate how to create an httpResource for async validation for a field,\n * and map its result to validation errors.\n *\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the httpResource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport interface HttpValidatorOptions<TValue, TResult, TPathKind extends PathKind = PathKind.Root> {\n /**\n * A function that receives the field context and returns the url or request for the httpResource.\n * If given a URL, the underlying httpResource will perform an HTTP GET on it.\n *\n * @param ctx The field context for the field being validated.\n * @returns The URL or request for creating the httpResource.\n */\n readonly request:\n | ((ctx: FieldContext<TValue, TPathKind>) => string | undefined)\n | ((ctx: FieldContext<TValue, TPathKind>) => HttpResourceRequest | undefined);\n\n /**\n * A function that takes the httpResource result, and the current field context and maps it to a\n * list of validation errors.\n *\n * @param result The httpResource result.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the httpResource result.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n */\n readonly onSuccess: MapToErrorsFn<TValue, TResult, TPathKind>;\n\n /**\n * A function to handle errors thrown by httpResource (HTTP errors, network errors, etc.).\n * Receives the error and the field context, returns a list of validation errors.\n */\n readonly onError: (error: unknown, ctx: FieldContext<TValue, TPathKind>) => TreeValidationResult;\n /**\n * The options to use when creating the httpResource.\n */\n readonly options?: HttpResourceOptions<TResult, unknown>;\n}\n\n/**\n * Adds async validation to the field corresponding to the given path based on an httpResource.\n * Async validation for a field only runs once all synchronous validation is passing.\n *\n * @param path A path indicating the field to bind the async validation logic to.\n * @param opts The http validation options.\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the httpResource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateHttp<TValue, TResult = unknown, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n opts: HttpValidatorOptions<TValue, TResult, TPathKind>,\n) {\n validateAsync(path, {\n params: opts.request,\n factory: (request: Signal<any>) => httpResource(request, opts.options),\n onSuccess: opts.onSuccess,\n onError: opts.onError,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DEBOUNCER} from '../../field/debounce';\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {Debouncer, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Configures the frequency at which a form field is updated by UI events.\n *\n * When this rule is applied, updates from the UI to the form model will be delayed until either\n * the field is touched, or the most recently debounced update resolves.\n *\n * @param path The target path to debounce.\n * @param durationOrDebouncer Either a debounce duration in milliseconds, or a custom\n * {@link Debouncer} function.\n *\n * @experimental 21.0.0\n */\nexport function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n durationOrDebouncer: number | Debouncer<TValue, TPathKind>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n const debouncer =\n typeof durationOrDebouncer === 'function'\n ? durationOrDebouncer\n : durationOrDebouncer > 0\n ? debounceForDuration(durationOrDebouncer)\n : immediate;\n pathNode.builder.addMetadataRule(DEBOUNCER, () => debouncer);\n}\n\nfunction debounceForDuration(durationInMilliseconds: number): Debouncer<unknown> {\n return (_context, abortSignal) => {\n return new Promise((resolve) => {\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n const onAbort = () => {\n clearTimeout(timeoutId);\n resolve();\n };\n\n timeoutId = setTimeout(() => {\n abortSignal.removeEventListener('abort', onAbort);\n resolve();\n }, durationInMilliseconds);\n\n abortSignal.addEventListener('abort', onAbort, {once: true});\n });\n };\n}\n\nfunction immediate() {}\n"],"names":["SIGNAL_FORMS_CONFIG","InjectionToken","ngDevMode","provideSignalFormsConfig","config","provide","useValue","InteropNgControl","field","constructor","control","value","valid","invalid","pending","disabled","enabled","errors","length","errObj","error","kind","pristine","dirty","touched","untouched","status","RuntimeError","valueAccessor","hasValidator","validator","Validators","required","updateValueAndValidity","FORM_FIELD","controlInstructions","create","createControlBinding","update","updateControlBinding","FormField","element","inject","ElementRef","nativeElement","injector","Injector","formField","input","state","computed","debugName","bindingOptions","signal","undefined","ɵCONTROL","optional","classes","Object","entries","map","className","computation","controlValueAccessors","NG_VALUE_ACCESSOR","self","interopNgControl","ɵinteropControl","getOrCreateNgControl","registerAsBinding","untracked","set","effect","onCleanup","fieldNode","nodeState","formFieldBindings","controls","filter","c","focus","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","providers","useExisting","NgControl","useFactory","ngImport","decorators","args","path","logic","assertPathIsCurrent","pathNode","FieldPathNode","unwrapFieldPath","builder","addDisabledReasonRule","ctx","result","fieldTree","message","hidden","addHiddenRule","readonly","addReadonlyRule","getLengthOrSize","v","size","getOption","opt","Function","isEmpty","isNaN","validate","addSyncErrorRule","addDefaultField","requiredError","options","RequiredValidationError","minError","min","MinValidationError","maxError","max","MaxValidationError","minLengthError","minLength","MinLengthValidationError","maxLengthError","maxLength","MaxLengthValidationError","patternError","pattern","PatternValidationError","emailError","EmailValidationError","standardSchemaError","issue","StandardSchemaValidationError","_NgValidationError","__brand","assign","NgValidationError","EMAIL_REGEXP","email","test","maxValue","MAX_MEMO","metadata","createMetadataKey","MAX","Number","numValue","NaN","MAX_LENGTH_MEMO","MAX_LENGTH","minValue","MIN_MEMO","MIN","MIN_LENGTH_MEMO","MIN_LENGTH","PATTERN_MEMO","RegExp","PATTERN","REQUIRED_MEMO","when","REQUIRED","validateAsync","opts","RESOURCE","createManagedMetadataKey","factory","node","stateOf","validationState","shouldSkipValidation","syncValid","params","addAsyncErrorRule","res","hasValue","onSuccess","onError","validateTree","addSyncTreeErrorRule","validateStandardSchema","schema","VALIDATOR_MEMO","fieldTreeOf","ɵisPromise","issues","standardIssueToFormTreeError","resource","loader","pathPart","pathKey","key","validateHttp","request","httpResource","debounce","durationOrDebouncer","debouncer","debounceForDuration","immediate","addMetadataRule","DEBOUNCER","durationInMilliseconds","_context","abortSignal","Promise","resolve","timeoutId","onAbort","clearTimeout","setTimeout","removeEventListener","addEventListener","once"],"mappings":";;;;;;;;;;;;;;AAYO,MAAMA,mBAAmB,GAAG,IAAIC,cAAc,CACnD,OAAOC,SAAS,KAAK,WAAW,IAA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IAAI,EAAE;AAAI,OAAC,CAAC;AAC9D,KAAC,CAAC;GACH;AACH;AAEA,SAASd,SAASA;;;;"}
|
|
1
|
+
{"version":3,"file":"signals.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/field/di.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/di.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/controls/interop_ng_control.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/form_field_directive.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/disabled.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/hidden.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/readonly.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/util.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validation_errors.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/email.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/max.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/max_length.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/min.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/min_length.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/pattern.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/required.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_async.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_tree.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/standard_schema.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/validation/validate_http.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/forms/signals/src/api/rules/debounce.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {SignalFormsConfig} from '../api/di';\n\n/** Injection token for the signal forms configuration. */\nexport const SIGNAL_FORMS_CONFIG = new InjectionToken<SignalFormsConfig>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'SIGNAL_FORMS_CONFIG' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {type Provider} from '@angular/core';\nimport {SIGNAL_FORMS_CONFIG} from '../field/di';\nimport type {FormField} from './form_field_directive';\n\n/**\n * Configuration options for signal forms.\n *\n * @experimental 21.0.1\n */\nexport interface SignalFormsConfig {\n /** A map of CSS class names to predicate functions that determine when to apply them. */\n classes?: {[className: string]: (state: FormField<unknown>) => boolean};\n}\n\n/**\n * Provides configuration options for signal forms.\n *\n * @experimental 21.0.1\n */\nexport function provideSignalFormsConfig(config: SignalFormsConfig): Provider[] {\n return [{provide: SIGNAL_FORMS_CONFIG, useValue: config}];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {SignalFormsErrorCode} from '../errors';\n\nimport {\n ControlValueAccessor,\n Validators,\n type AbstractControl,\n type FormControlStatus,\n type NgControl,\n type ValidationErrors,\n type ValidatorFn,\n} from '@angular/forms';\nimport type {FieldState} from '../api/types';\n\n// TODO: Also consider supporting (if possible):\n// - hasError\n// - getError\n// - reset\n// - name\n// - path\n// - markAs[Touched,Dirty,etc.]\n\n/**\n * Properties of both NgControl & AbstractControl that are supported by the InteropNgControl.\n */\nexport type InteropSharedKeys =\n | 'value'\n | 'valid'\n | 'invalid'\n | 'touched'\n | 'untouched'\n | 'disabled'\n | 'enabled'\n | 'errors'\n | 'pristine'\n | 'dirty'\n | 'status';\n\n/**\n * A fake version of `NgControl` provided by the `Field` directive. This allows interoperability\n * with a wider range of components designed to work with reactive forms, in particular ones that\n * inject the `NgControl`. The interop control does not implement *all* properties and methods of\n * the real `NgControl`, but does implement some of the most commonly used ones that have a clear\n * equivalent in signal forms.\n */\nexport class InteropNgControl\n implements\n Pick<NgControl, InteropSharedKeys | 'control' | 'valueAccessor'>,\n Pick<AbstractControl<unknown>, InteropSharedKeys | 'hasValidator'>\n{\n constructor(protected field: () => FieldState<unknown>) {}\n\n readonly control: AbstractControl<any, any> = this as unknown as AbstractControl<any, any>;\n\n get value(): any {\n return this.field().value();\n }\n\n get valid(): boolean {\n return this.field().valid();\n }\n\n get invalid(): boolean {\n return this.field().invalid();\n }\n\n get pending(): boolean | null {\n return this.field().pending();\n }\n\n get disabled(): boolean {\n return this.field().disabled();\n }\n\n get enabled(): boolean {\n return !this.field().disabled();\n }\n\n get errors(): ValidationErrors | null {\n const errors = this.field().errors();\n if (errors.length === 0) {\n return null;\n }\n const errObj: ValidationErrors = {};\n for (const error of errors) {\n errObj[error.kind] = error;\n }\n return errObj;\n }\n\n get pristine(): boolean {\n return !this.field().dirty();\n }\n\n get dirty(): boolean {\n return this.field().dirty();\n }\n\n get touched(): boolean {\n return this.field().touched();\n }\n\n get untouched(): boolean {\n return !this.field().touched();\n }\n\n get status(): FormControlStatus {\n if (this.field().disabled()) {\n return 'DISABLED';\n }\n if (this.field().valid()) {\n return 'VALID';\n }\n if (this.field().invalid()) {\n return 'INVALID';\n }\n if (this.field().pending()) {\n return 'PENDING';\n }\n throw new RuntimeError(\n SignalFormsErrorCode.UNKNOWN_STATUS,\n ngDevMode && 'Unknown form control status',\n );\n }\n\n valueAccessor: ControlValueAccessor | null = null;\n\n hasValidator(validator: ValidatorFn): boolean {\n // This addresses a common case where users look for the presence of `Validators.required` to\n // determine whether or not to show a required \"*\" indicator in the UI.\n if (validator === Validators.required) {\n return this.field().required();\n }\n return false;\n }\n\n updateValueAndValidity() {\n // No-op since value and validity are always up to date in signal forms.\n // We offer this method so that reactive forms code attempting to call it doesn't error.\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n computed,\n ɵɵcontrolCreate as createControlBinding,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n Injector,\n input,\n ɵRuntimeError as RuntimeError,\n signal,\n untracked,\n ɵcontrolUpdate as updateControlBinding,\n ɵCONTROL,\n ɵInteropControl,\n type Signal,\n type ɵFormFieldBindingOptions,\n type ɵFormFieldDirective,\n} from '@angular/core';\nimport {NG_VALUE_ACCESSOR, NgControl} from '@angular/forms';\nimport {InteropNgControl} from '../controls/interop_ng_control';\nimport {SignalFormsErrorCode} from '../errors';\nimport {SIGNAL_FORMS_CONFIG} from '../field/di';\nimport type {FieldNode} from '../field/node';\nimport type {ValidationError} from './rules';\nimport type {FieldTree} from './types';\n\nexport interface FormFieldBindingOptions<TValue> extends ɵFormFieldBindingOptions {\n /**\n * Focuses the binding.\n *\n * If not specified, Signal Forms will attempt to focus the host element of the `FormField` when\n * asked to focus this binding.\n */\n focus?(options?: FocusOptions): void;\n\n readonly parseErrors?: Signal<ValidationError.WithoutFieldTree[]>;\n}\n\n/**\n * Lightweight DI token provided by the {@link FormField} directive.\n *\n * @category control\n * @experimental 21.0.0\n */\nexport const FORM_FIELD = new InjectionToken<FormField<unknown>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'FORM_FIELD' : '',\n);\n\n/**\n * Instructions for dynamically binding a {@link FormField} to a form control.\n */\nconst controlInstructions = {\n create: createControlBinding,\n update: updateControlBinding,\n} as const;\n\n/**\n * Binds a form `FieldTree` to a UI control that edits it. A UI control can be one of several things:\n * 1. A native HTML input or textarea\n * 2. A signal forms custom control that implements `FormValueControl` or `FormCheckboxControl`\n * 3. A component that provides a `ControlValueAccessor`. This should only be used for backwards\n * compatibility with reactive forms. Prefer options (1) and (2).\n *\n * This directive has several responsibilities:\n * 1. Two-way binds the field state's value with the UI control's value\n * 2. Binds additional forms related state on the field state to the UI control (disabled, required, etc.)\n * 3. Relays relevant events on the control to the field state (e.g. marks touched on blur)\n * 4. Provides a fake `NgControl` that implements a subset of the features available on the\n * reactive forms `NgControl`. This is provided to improve interoperability with controls\n * designed to work with reactive forms. It should not be used by controls written for signal\n * forms.\n *\n * @category control\n * @experimental 21.0.0\n */\n@Directive({\n selector: '[formField]',\n exportAs: 'formField',\n providers: [\n {provide: FORM_FIELD, useExisting: FormField},\n {provide: NgControl, useFactory: () => inject(FormField).getOrCreateNgControl()},\n ],\n})\n// This directive should `implements ɵFormFieldDirective<T>`, but actually adding that breaks people's\n// builds because part of the public API is marked `@internal` and stripped.\n// Instead we have an type check below that enforces this in a non-breaking way.\nexport class FormField<T> {\n readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly injector = inject(Injector);\n readonly fieldTree = input.required<FieldTree<T>>({alias: 'formField'});\n readonly state = computed(() => this.fieldTree()());\n private readonly bindingOptions = signal<FormFieldBindingOptions<T> | undefined>(undefined);\n\n /** @internal */\n readonly parseErrors = computed<ValidationError.WithFormField[]>(\n () =>\n this.bindingOptions()\n ?.parseErrors?.()\n .map((err) => ({\n ...err,\n fieldTree: this.fieldTree(),\n formField: this as FormField<unknown>,\n })) ?? [],\n );\n\n /** Errors associated with this form field. */\n readonly errors = computed(() =>\n this.state()\n .errors()\n .filter((err) => !err.formField || err.formField === this),\n );\n\n readonly [ɵCONTROL] = controlInstructions;\n\n private config = inject(SIGNAL_FORMS_CONFIG, {optional: true});\n /** @internal */\n readonly classes = Object.entries(this.config?.classes ?? {}).map(\n ([className, computation]) =>\n [className, computed(() => computation(this as FormField<unknown>))] as const,\n );\n\n /** Any `ControlValueAccessor` instances provided on the host element. */\n private readonly controlValueAccessors = inject(NG_VALUE_ACCESSOR, {optional: true, self: true});\n\n /** A lazily instantiated fake `NgControl`. */\n private interopNgControl: InteropNgControl | undefined;\n\n /**\n * A `ControlValueAccessor`, if configured, for the host component.\n *\n * @internal\n */\n get ɵinteropControl(): ɵInteropControl | undefined {\n return this.controlValueAccessors?.[0] ?? this.interopNgControl?.valueAccessor ?? undefined;\n }\n\n /** Lazily instantiates a fake `NgControl` for this form field. */\n protected getOrCreateNgControl(): InteropNgControl {\n return (this.interopNgControl ??= new InteropNgControl(this.state));\n }\n\n /**\n * Registers this `FormField` as a binding on its associated `FieldState`.\n *\n * This method should be called at most once for a given `FormField`. A `FormField` placed on a\n * custom control (`FormUiControl`) automatically registers that custom control as a binding.\n */\n registerAsBinding(bindingOptions?: FormFieldBindingOptions<T>) {\n if (untracked(this.bindingOptions)) {\n throw new RuntimeError(\n SignalFormsErrorCode.BINDING_ALREADY_REGISTERED,\n ngDevMode && 'FormField already registered as a binding',\n );\n }\n\n this.bindingOptions.set(bindingOptions);\n // Register this control on the field state it is currently bound to. We do this at the end of\n // initialization so that it only runs if we are actually syncing with this control\n // (as opposed to just passing the field state through to its `formField` input).\n effect(\n (onCleanup) => {\n const fieldNode = this.state() as unknown as FieldNode;\n fieldNode.nodeState.formFieldBindings.update((controls) => [\n ...controls,\n this as FormField<unknown>,\n ]);\n onCleanup(() => {\n fieldNode.nodeState.formFieldBindings.update((controls) =>\n controls.filter((c) => c !== this),\n );\n });\n },\n {injector: this.injector},\n );\n }\n\n /** Focuses this UI control. */\n focus(options?: FocusOptions) {\n const bindingOptions = untracked(this.bindingOptions);\n if (bindingOptions?.focus) {\n bindingOptions.focus(options);\n } else {\n this.element.focus(options);\n }\n }\n}\n\n// We can't add `implements ɵFormFieldDirective<T>` to `Field` even though it should conform to the interface.\n// Instead we enforce it here through some utility types.\ntype Check<T extends true> = T;\ntype FormFieldImplementsɵFormFieldDirective = Check<\n FormField<any> extends ɵFormFieldDirective<any> ? true : false\n>;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {FieldContext, LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally disable it. A disabled field does not contribute to the\n * validation, touched/dirty, or other state of its parent field.\n *\n * @param path The target path to add the disabled logic to.\n * @param logic A reactive function that returns `true` (or a string reason) when the field is disabled,\n * and `false` when it is not disabled.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function disabled<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic?: string | NoInfer<LogicFn<TValue, boolean | string, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addDisabledReasonRule((ctx) => {\n let result: boolean | string = true;\n if (typeof logic === 'string') {\n result = logic;\n } else if (logic) {\n result = logic(ctx as FieldContext<TValue, TPathKind>);\n }\n if (typeof result === 'string') {\n return {fieldTree: ctx.fieldTree, message: result};\n }\n return result ? {fieldTree: ctx.fieldTree} : undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally hide it. A hidden field does not contribute to the\n * validation, touched/dirty, or other state of its parent field.\n *\n * If a field may be hidden it is recommended to guard it with an `@if` in the template:\n * ```\n * @if (!email().hidden()) {\n * <label for=\"email\">Email</label>\n * <input id=\"email\" type=\"email\" [control]=\"email\" />\n * }\n * ```\n *\n * @param path The target path to add the hidden logic to.\n * @param logic A reactive function that returns `true` when the field is hidden.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function hidden<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<LogicFn<TValue, boolean, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addHiddenRule(logic);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Adds logic to a field to conditionally make it readonly. A readonly field does not contribute to\n * the validation, touched/dirty, or other state of its parent field.\n *\n * @param path The target path to make readonly.\n * @param logic A reactive function that returns `true` when the field is readonly.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function readonly<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<LogicFn<TValue, boolean, TPathKind>> = () => true,\n) {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addReadonlyRule(logic);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, OneOrMany, PathKind, type FieldContext} from '../../types';\nimport {ValidationError} from './validation_errors';\n\n/** Represents a value that has a length or size, such as an array or string, or set. */\nexport type ValueWithLengthOrSize = {length: number} | {size: number};\n\n/** Common options available on the standard validators. */\nexport type BaseValidatorConfig<TValue, TPathKind extends PathKind = PathKind.Root> =\n | {\n /** A user-facing error message to include with the error. */\n message?: string | LogicFn<TValue, string, TPathKind>;\n error?: never;\n }\n | {\n /**\n * Custom validation error(s) to report instead of the default,\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n */\n error?: OneOrMany<ValidationError> | LogicFn<TValue, OneOrMany<ValidationError>, TPathKind>;\n message?: never;\n };\n\n/** Gets the length or size of the given value. */\nexport function getLengthOrSize(value: ValueWithLengthOrSize) {\n const v = value as {length: number; size: number};\n return typeof v.length === 'number' ? v.length : v.size;\n}\n\n/**\n * Gets the value for an option that may be either a static value or a logic function that produces\n * the option value.\n *\n * @param opt The option from BaseValidatorConfig.\n * @param ctx The current FieldContext.\n * @returns The value for the option.\n */\nexport function getOption<TOption, TValue, TPathKind extends PathKind = PathKind.Root>(\n opt: Exclude<TOption, Function> | LogicFn<TValue, TOption, TPathKind> | undefined,\n ctx: FieldContext<TValue, TPathKind>,\n): TOption | undefined {\n return opt instanceof Function ? opt(ctx) : opt;\n}\n\n/**\n * Checks if the given value is considered empty. Empty values are: null, undefined, '', false, NaN.\n */\nexport function isEmpty(value: unknown): boolean {\n if (typeof value === 'number') {\n return isNaN(value);\n }\n return value === '' || value === false || value == null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport type {\n FieldContext,\n FieldValidator,\n PathKind,\n SchemaPath,\n SchemaPathRules,\n} from '../../types';\n\n/**\n * Adds logic to a field to determine if the field has validation errors.\n *\n * @param path The target path to add the validation logic to.\n * @param logic A `Validator` that returns the current validation errors.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function validate<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<FieldValidator<TValue, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addSyncErrorRule((ctx) => {\n return addDefaultField(logic(ctx as FieldContext<TValue, TPathKind>), ctx.fieldTree);\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {StandardSchemaV1} from '@standard-schema/spec';\nimport type {FormField} from '../../form_field_directive';\nimport type {FieldTree} from '../../types';\n\n/**\n * Options used to create a `ValidationError`.\n */\ninterface ValidationErrorOptions {\n /** Human readable error message. */\n message?: string;\n}\n\n/**\n * A type that requires the given type `T` to have a `field` property.\n * @template T The type to add a `field` to.\n *\n * @experimental 21.0.0\n */\nexport type WithFieldTree<T> = T & {fieldTree: FieldTree<unknown>};\n/** @deprecated Use `WithFieldTree` instead */\nexport type WithField<T> = WithFieldTree<T>;\n\n/**\n * A type that allows the given type `T` to optionally have a `field` property.\n * @template T The type to optionally add a `field` to.\n *\n * @experimental 21.0.0\n */\nexport type WithOptionalFieldTree<T> = Omit<T, 'fieldTree'> & {fieldTree?: FieldTree<unknown>};\n/** @deprecated Use `WithOptionalFieldTree` instead */\nexport type WithOptionalField<T> = WithOptionalFieldTree<T>;\n\n/**\n * A type that ensures the given type `T` does not have a `field` property.\n * @template T The type to remove the `field` from.\n *\n * @experimental 21.0.0\n */\nexport type WithoutFieldTree<T> = T & {fieldTree: never};\n/** @deprecated Use `WithoutFieldTree` instead */\nexport type WithoutField<T> = WithoutFieldTree<T>;\n\n/**\n * Create a required error associated with the target field\n * @param options The validation error options\n *\n * @experimental 21.0.0\n */\nexport function requiredError(\n options: WithFieldTree<ValidationErrorOptions>,\n): RequiredValidationError;\n/**\n * Create a required error\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function requiredError(\n options?: ValidationErrorOptions,\n): WithoutFieldTree<RequiredValidationError>;\nexport function requiredError(\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<RequiredValidationError> {\n return new RequiredValidationError(options);\n}\n\n/**\n * Create a min value error associated with the target field\n * @param min The min value constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minError(\n min: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MinValidationError;\n/**\n * Create a min value error\n * @param min The min value constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minError(\n min: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MinValidationError>;\nexport function minError(\n min: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MinValidationError> {\n return new MinValidationError(min, options);\n}\n\n/**\n * Create a max value error associated with the target field\n * @param max The max value constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxError(\n max: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MaxValidationError;\n/**\n * Create a max value error\n * @param max The max value constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxError(\n max: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MaxValidationError>;\nexport function maxError(\n max: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MaxValidationError> {\n return new MaxValidationError(max, options);\n}\n\n/**\n * Create a minLength error associated with the target field\n * @param minLength The minLength constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLengthError(\n minLength: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MinLengthValidationError;\n/**\n * Create a minLength error\n * @param minLength The minLength constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLengthError(\n minLength: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MinLengthValidationError>;\nexport function minLengthError(\n minLength: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MinLengthValidationError> {\n return new MinLengthValidationError(minLength, options);\n}\n\n/**\n * Create a maxLength error associated with the target field\n * @param maxLength The maxLength constraint\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLengthError(\n maxLength: number,\n options: WithFieldTree<ValidationErrorOptions>,\n): MaxLengthValidationError;\n/**\n * Create a maxLength error\n * @param maxLength The maxLength constraint\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLengthError(\n maxLength: number,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<MaxLengthValidationError>;\nexport function maxLengthError(\n maxLength: number,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<MaxLengthValidationError> {\n return new MaxLengthValidationError(maxLength, options);\n}\n\n/**\n * Create a pattern matching error associated with the target field\n * @param pattern The violated pattern\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function patternError(\n pattern: RegExp,\n options: WithFieldTree<ValidationErrorOptions>,\n): PatternValidationError;\n/**\n * Create a pattern matching error\n * @param pattern The violated pattern\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function patternError(\n pattern: RegExp,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<PatternValidationError>;\nexport function patternError(\n pattern: RegExp,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<PatternValidationError> {\n return new PatternValidationError(pattern, options);\n}\n\n/**\n * Create an email format error associated with the target field\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function emailError(options: WithFieldTree<ValidationErrorOptions>): EmailValidationError;\n/**\n * Create an email format error\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function emailError(\n options?: ValidationErrorOptions,\n): WithoutFieldTree<EmailValidationError>;\nexport function emailError(\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<EmailValidationError> {\n return new EmailValidationError(options);\n}\n\n/**\n * Create a standard schema issue error associated with the target field\n * @param issue The standard schema issue\n * @param options The validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options: WithFieldTree<ValidationErrorOptions>,\n): StandardSchemaValidationError;\n/**\n * Create a standard schema issue error\n * @param issue The standard schema issue\n * @param options The optional validation error options\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n): WithoutFieldTree<StandardSchemaValidationError>;\nexport function standardSchemaError(\n issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n): WithOptionalFieldTree<StandardSchemaValidationError> {\n return new StandardSchemaValidationError(issue, options);\n}\n\n/**\n * Common interface for all validation errors.\n *\n * This can be returned from validators.\n *\n * It's also used by the creation functions to create an instance\n * (e.g. `requiredError`, `minError`, etc.).\n *\n * @see [Signal Form Validation](guide/forms/signals/validation)\n * @see [Signal Form Validation Errors](guide/forms/signals/validation#validation-errors)\n * @category validation\n * @experimental 21.0.0\n */\nexport interface ValidationError {\n /** Identifies the kind of error. */\n readonly kind: string;\n /** Human readable error message. */\n readonly message?: string;\n}\n\nexport declare namespace ValidationError {\n /**\n * Validation error with an associated field tree.\n *\n * This is returned from field state, e.g., catField.errors() would be of a list of errors with\n * `field: catField` bound to state.\n */\n export interface WithFieldTree extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree: FieldTree<unknown>;\n readonly formField?: FormField<unknown>;\n }\n /** @deprecated Use `ValidationError.WithFieldTree` instead */\n export type WithField = WithFieldTree;\n\n /**\n * Validation error with an associated field tree and specific form field binding.\n */\n export interface WithFormField extends WithFieldTree {\n readonly formField: FormField<unknown>;\n }\n\n /**\n * Validation error with optional field.\n *\n * This is generally used in places where the result might have a field.\n * e.g., as a result of a `validateTree`, or when handling form submission.\n */\n export interface WithOptionalFieldTree extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree?: FieldTree<unknown>;\n }\n /** @deprecated Use `ValidationError.WithOptionalFieldTree` instead */\n export type WithOptionalField = WithOptionalFieldTree;\n\n /**\n * Validation error with no field.\n *\n * This is used to strongly enforce that fields are not allowed in validation result.\n */\n export interface WithoutFieldTree extends ValidationError {\n /** The field associated with this error. */\n readonly fieldTree?: never;\n readonly formField?: never;\n }\n /** @deprecated Use `ValidationError.WithoutFieldTree` instead */\n export type WithoutField = WithoutFieldTree;\n}\n\n/**\n * Internal version of `NgValidationError`, we create this separately so we can change its type on\n * the exported version to a type union of the possible sub-classes.\n *\n * @experimental 21.0.0\n */\nabstract class _NgValidationError implements ValidationError {\n /** Brand the class to avoid Typescript structural matching */\n private __brand = undefined;\n\n /** Identifies the kind of error. */\n readonly kind: string = '';\n\n /** The field associated with this error. */\n readonly fieldTree!: FieldTree<unknown>;\n\n /** Human readable error message. */\n readonly message?: string;\n\n constructor(options?: ValidationErrorOptions) {\n if (options) {\n Object.assign(this, options);\n }\n }\n}\n\n/**\n * An error used to indicate that a required field is empty.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class RequiredValidationError extends _NgValidationError {\n override readonly kind = 'required';\n}\n\n/**\n * An error used to indicate that a value is lower than the minimum allowed.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MinValidationError extends _NgValidationError {\n override readonly kind = 'min';\n\n constructor(\n readonly min: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is higher than the maximum allowed.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MaxValidationError extends _NgValidationError {\n override readonly kind = 'max';\n\n constructor(\n readonly max: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is shorter than the minimum allowed length.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MinLengthValidationError extends _NgValidationError {\n override readonly kind = 'minLength';\n\n constructor(\n readonly minLength: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is longer than the maximum allowed length.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class MaxLengthValidationError extends _NgValidationError {\n override readonly kind = 'maxLength';\n\n constructor(\n readonly maxLength: number,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value does not match the required pattern.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class PatternValidationError extends _NgValidationError {\n override readonly kind = 'pattern';\n\n constructor(\n readonly pattern: RegExp,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * An error used to indicate that a value is not a valid email.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class EmailValidationError extends _NgValidationError {\n override readonly kind = 'email';\n}\n\n/**\n * An error used to indicate an issue validating against a standard schema.\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport class StandardSchemaValidationError extends _NgValidationError {\n override readonly kind = 'standardSchema';\n\n constructor(\n readonly issue: StandardSchemaV1.Issue,\n options?: ValidationErrorOptions,\n ) {\n super(options);\n }\n}\n\n/**\n * The base class for all built-in, non-custom errors. This class can be used to check if an error\n * is one of the standard kinds, allowing you to switch on the kind to further narrow the type.\n *\n * @example\n * ```ts\n * const f = form(...);\n * for (const e of form().errors()) {\n * if (e instanceof NgValidationError) {\n * switch(e.kind) {\n * case 'required':\n * console.log('This is required!');\n * break;\n * case 'min':\n * console.log(`Must be at least ${e.min}`);\n * break;\n * ...\n * }\n * }\n * }\n * ```\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport const NgValidationError: abstract new () => NgValidationError = _NgValidationError as any;\nexport type NgValidationError =\n | RequiredValidationError\n | MinValidationError\n | MaxValidationError\n | MinLengthValidationError\n | MaxLengthValidationError\n | PatternValidationError\n | EmailValidationError\n | StandardSchemaValidationError;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {emailError} from './validation_errors';\n\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n * punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n * `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n * periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n * - Disallow `local-part` to begin or end with a period (`.`).\n * - Disallow `local-part` length to exceed 64 characters.\n * - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP =\n /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * Binds a validator to the given path that requires the value to match the standard email format.\n * This function can only be called on string paths.\n *\n * @param path Path of the field to validate\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.email()`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Email Validation](guide/forms/signals/validation#email)\n * @category validation\n * @experimental 21.0.0\n */\nexport function email<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n config?: BaseValidatorConfig<string, TPathKind>,\n) {\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n if (!EMAIL_REGEXP.test(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return emailError({message: getOption(config?.message, ctx)});\n }\n }\n\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, MAX, metadata} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {maxError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be less than or equal to the\n * given `maxValue`.\n * This function can only be called on number paths.\n * In addition to binding a validator, this function adds `MAX` property to the field.\n *\n * @param path Path of the field to validate\n * @param maxValue The maximum value, or a LogicFn that returns the maximum value.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.max(maxValue)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Max Validation](guide/forms/signals/validation#min-and-max)\n * @category validation\n * @experimental 21.0.0\n */\nexport function max<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<number | string | null, SchemaPathRules.Supported, TPathKind>,\n maxValue: number | LogicFn<number | string | null, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<number | string | null, TPathKind>,\n) {\n const MAX_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof maxValue === 'number' ? maxValue : maxValue(ctx),\n );\n metadata(path, MAX, ({state}) => state.metadata(MAX_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const max = ctx.state.metadata(MAX_MEMO)!();\n if (max === undefined || Number.isNaN(max)) {\n return undefined;\n }\n const value = ctx.value();\n const numValue = !value && value !== 0 ? NaN : Number(value); // Treat `''` and `null` as `NaN`\n if (numValue > max) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return maxError(max, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, MAX_LENGTH, metadata} from '../metadata';\nimport {\n BaseValidatorConfig,\n getLengthOrSize,\n getOption,\n isEmpty,\n ValueWithLengthOrSize,\n} from './util';\nimport {validate} from './validate';\nimport {maxLengthError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the length of the value to be less than or\n * equal to the given `maxLength`.\n * This function can only be called on string or array paths.\n * In addition to binding a validator, this function adds `MAX_LENGTH` property to the field.\n *\n * @param path Path of the field to validate\n * @param maxLength The maximum length, or a LogicFn that returns the maximum length.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.maxLength(maxLength)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Max Length Validation](guide/forms/signals/validation#minlength-and-maxlength)\n * @category validation\n * @experimental 21.0.0\n */\nexport function maxLength<\n TValue extends ValueWithLengthOrSize,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n maxLength: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MAX_LENGTH_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof maxLength === 'number' ? maxLength : maxLength(ctx),\n );\n metadata(path, MAX_LENGTH, ({state}) => state.metadata(MAX_LENGTH_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const maxLength = ctx.state.metadata(MAX_LENGTH_MEMO)!();\n if (maxLength === undefined) {\n return undefined;\n }\n if (getLengthOrSize(ctx.value()) > maxLength) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return maxLengthError(maxLength, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, MIN} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {minError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be greater than or equal to\n * the given `minValue`.\n * This function can only be called on number paths.\n * In addition to binding a validator, this function adds `MIN` property to the field.\n *\n * @param path Path of the field to validate\n * @param minValue The minimum value, or a LogicFn that returns the minimum value.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.min(minValue)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Min Validation](guide/forms/signals/validation#min-and-max)\n * @category validation\n * @experimental 21.0.0\n */\nexport function min<\n TValue extends number | string | null,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n minValue: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MIN_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof minValue === 'number' ? minValue : minValue(ctx),\n );\n metadata(path, MIN, ({state}) => state.metadata(MIN_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const min = ctx.state.metadata(MIN_MEMO)!();\n if (min === undefined || Number.isNaN(min)) {\n return undefined;\n }\n const value = ctx.value();\n const numValue = !value && value !== 0 ? NaN : Number(value); // Treat `''` and `null` as `NaN`\n if (numValue < min) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return minError(min, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, MIN_LENGTH} from '../metadata';\nimport {\n BaseValidatorConfig,\n getLengthOrSize,\n getOption,\n isEmpty,\n ValueWithLengthOrSize,\n} from './util';\nimport {validate} from './validate';\nimport {minLengthError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the length of the value to be greater than or\n * equal to the given `minLength`.\n * This function can only be called on string or array paths.\n * In addition to binding a validator, this function adds `MIN_LENGTH` property to the field.\n *\n * @param path Path of the field to validate\n * @param minLength The minimum length, or a LogicFn that returns the minimum length.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.minLength(minLength)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Min Length Validation](guide/forms/signals/validation#minlength-and-maxlength)\n * @category validation\n * @experimental 21.0.0\n */\nexport function minLength<\n TValue extends ValueWithLengthOrSize,\n TPathKind extends PathKind = PathKind.Root,\n>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n minLength: number | LogicFn<TValue, number | undefined, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind>,\n) {\n const MIN_LENGTH_MEMO = metadata(path, createMetadataKey<number | undefined>(), (ctx) =>\n typeof minLength === 'number' ? minLength : minLength(ctx),\n );\n metadata(path, MIN_LENGTH, ({state}) => state.metadata(MIN_LENGTH_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const minLength = ctx.state.metadata(MIN_LENGTH_MEMO)!();\n if (minLength === undefined) {\n return undefined;\n }\n if (getLengthOrSize(ctx.value()) < minLength) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return minLengthError(minLength, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, PATTERN} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {patternError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to match a specific regex pattern.\n * This function can only be called on string paths.\n * In addition to binding a validator, this function adds `PATTERN` property to the field.\n *\n * @param path Path of the field to validate\n * @param pattern The RegExp pattern to match, or a LogicFn that returns the RegExp pattern.\n * @param config Optional, allows providing any of the following options:\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.pattern(pattern)`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Pattern Validation](guide/forms/signals/validation#pattern)\n * @category validation\n * @experimental 21.0.0\n */\nexport function pattern<TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>,\n pattern: RegExp | LogicFn<string | undefined, RegExp | undefined, TPathKind>,\n config?: BaseValidatorConfig<string, TPathKind>,\n) {\n const PATTERN_MEMO = metadata(path, createMetadataKey<RegExp | undefined>(), (ctx) =>\n pattern instanceof RegExp ? pattern : pattern(ctx),\n );\n metadata(path, PATTERN, ({state}) => state.metadata(PATTERN_MEMO)!());\n validate(path, (ctx) => {\n if (isEmpty(ctx.value())) {\n return undefined;\n }\n const pattern = ctx.state.metadata(PATTERN_MEMO)!();\n if (pattern === undefined) {\n return undefined;\n }\n if (!pattern.test(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return patternError(pattern, {message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {LogicFn, PathKind, SchemaPath, SchemaPathRules} from '../../types';\nimport {createMetadataKey, metadata, REQUIRED} from '../metadata';\nimport {BaseValidatorConfig, getOption, isEmpty} from './util';\nimport {validate} from './validate';\nimport {requiredError} from './validation_errors';\n\n/**\n * Binds a validator to the given path that requires the value to be non-empty.\n * This function can only be called on any type of path.\n * In addition to binding a validator, this function adds `REQUIRED` property to the field.\n *\n * @param path Path of the field to validate\n * @param config Optional, allows providing any of the following options:\n * - `message`: A user-facing message for the error.\n * - `error`: Custom validation error(s) to be used instead of the default `ValidationError.required()`\n * or a function that receives the `FieldContext` and returns custom validation error(s).\n * - `when`: A function that receives the `FieldContext` and returns true if the field is required\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @see [Signal Form Required Validation](guide/forms/signals/validation#required)\n * @category validation\n * @experimental 21.0.0\n */\nexport function required<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n config?: BaseValidatorConfig<TValue, TPathKind> & {\n when?: NoInfer<LogicFn<TValue, boolean, TPathKind>>;\n },\n): void {\n const REQUIRED_MEMO = metadata(path, createMetadataKey<boolean>(), (ctx) =>\n config?.when ? config.when(ctx) : true,\n );\n metadata(path, REQUIRED, ({state}) => state.metadata(REQUIRED_MEMO)!()!);\n validate(path, (ctx) => {\n if (ctx.state.metadata(REQUIRED_MEMO)!() && isEmpty(ctx.value())) {\n if (config?.error) {\n return getOption(config.error, ctx);\n } else {\n return requiredError({message: getOption(config?.message, ctx)});\n }\n }\n return undefined;\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ResourceRef, Signal} from '@angular/core';\nimport {FieldNode} from '../../../field/node';\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport {\n FieldContext,\n PathKind,\n SchemaPath,\n SchemaPathRules,\n TreeValidationResult,\n} from '../../types';\nimport {createManagedMetadataKey, metadata} from '../metadata';\n\n/**\n * A function that takes the result of an async operation and the current field context, and maps it\n * to a list of validation errors.\n *\n * @param result The result of the async operation.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the result of the async operation.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the async operation\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @experimental 21.0.0\n */\nexport type MapToErrorsFn<TValue, TResult, TPathKind extends PathKind = PathKind.Root> = (\n result: TResult,\n ctx: FieldContext<TValue, TPathKind>,\n) => TreeValidationResult;\n\n/**\n * Options that indicate how to create a resource for async validation for a field,\n * and map its result to validation errors.\n *\n * @template TValue The type of value stored in the field being validated.\n * @template TParams The type of parameters to the resource.\n * @template TResult The type of result returned by the resource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport interface AsyncValidatorOptions<\n TValue,\n TParams,\n TResult,\n TPathKind extends PathKind = PathKind.Root,\n> {\n /**\n * A function that receives the field context and returns the params for the resource.\n *\n * @param ctx The field context for the field being validated.\n * @returns The params for the resource.\n */\n readonly params: (ctx: FieldContext<TValue, TPathKind>) => TParams;\n\n /**\n * A function that receives the resource params and returns a resource of the given params.\n * The given params should be used as is to create the resource.\n * The forms system will report the params as `undefined` when this validation doesn't need to be run.\n *\n * @param params The params to use for constructing the resource\n * @returns A reference to the constructed resource.\n */\n readonly factory: (params: Signal<TParams | undefined>) => ResourceRef<TResult | undefined>;\n /**\n * A function to handle errors thrown by httpResource (HTTP errors, network errors, etc.).\n * Receives the error and the field context, returns a list of validation errors.\n */\n readonly onError: (error: unknown, ctx: FieldContext<TValue, TPathKind>) => TreeValidationResult;\n /**\n * A function that takes the resource result, and the current field context and maps it to a list\n * of validation errors.\n *\n * @param result The resource result.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the resource result.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n */\n readonly onSuccess: MapToErrorsFn<TValue, TResult, TPathKind>;\n}\n\n/**\n * Adds async validation to the field corresponding to the given path based on a resource.\n * Async validation for a field only runs once all synchronous validation is passing.\n *\n * @param path A path indicating the field to bind the async validation logic to.\n * @param opts The async validation options.\n * @template TValue The type of value stored in the field being validated.\n * @template TParams The type of parameters to the resource.\n * @template TResult The type of result returned by the resource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateAsync<TValue, TParams, TResult, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n opts: AsyncValidatorOptions<TValue, TParams, TResult, TPathKind>,\n): void {\n assertPathIsCurrent(path);\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n\n const RESOURCE = createManagedMetadataKey<ReturnType<typeof opts.factory>, TParams | undefined>(\n opts.factory,\n );\n metadata(path, RESOURCE, (ctx) => {\n const node = ctx.stateOf(path) as FieldNode;\n const validationState = node.validationState;\n if (validationState.shouldSkipValidation() || !validationState.syncValid()) {\n return undefined;\n }\n return opts.params(ctx);\n });\n\n pathNode.builder.addAsyncErrorRule((ctx) => {\n const res = ctx.state.metadata(RESOURCE)!;\n let errors;\n switch (res.status()) {\n case 'idle':\n return undefined;\n case 'loading':\n case 'reloading':\n return 'pending';\n case 'resolved':\n case 'local':\n if (!res.hasValue()) {\n return undefined;\n }\n errors = opts.onSuccess(res.value()!, ctx as FieldContext<TValue, TPathKind>);\n return addDefaultField(errors, ctx.fieldTree);\n case 'error':\n errors = opts.onError(res.error(), ctx as FieldContext<TValue, TPathKind>);\n return addDefaultField(errors, ctx.fieldTree);\n }\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {addDefaultField} from '../../../field/validation';\nimport {FieldPathNode} from '../../../schema/path_node';\nimport {assertPathIsCurrent} from '../../../schema/schema';\nimport type {FieldContext, PathKind, SchemaPath, SchemaPathRules, TreeValidator} from '../../types';\n\n/**\n * Adds logic to a field to determine if the field or any of its child fields has validation errors.\n *\n * @param path The target path to add the validation logic to.\n * @param logic A `TreeValidator` that returns the current validation errors.\n * Errors returned by the validator may specify a target field to indicate an error on a child field.\n * @template TValue The type of value stored in the field the logic is bound to.\n * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)\n *\n * @category logic\n * @experimental 21.0.0\n */\nexport function validateTree<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n logic: NoInfer<TreeValidator<TValue, TPathKind>>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n pathNode.builder.addSyncTreeErrorRule((ctx) =>\n addDefaultField(logic(ctx as FieldContext<TValue, TPathKind>), ctx.fieldTree),\n );\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {resource, ɵisPromise} from '@angular/core';\nimport type {StandardSchemaV1} from '@standard-schema/spec';\nimport {addDefaultField} from '../../../field/validation';\nimport type {FieldTree, SchemaPath, SchemaPathTree} from '../../types';\nimport {createMetadataKey, metadata} from '../metadata';\nimport {validateAsync} from './validate_async';\nimport {validateTree} from './validate_tree';\nimport {standardSchemaError, StandardSchemaValidationError} from './validation_errors';\n\n/**\n * Utility type that removes a string index key when its value is `unknown`,\n * i.e. `{[key: string]: unknown}`. It allows specific string keys to pass through, even if their\n * value is `unknown`, e.g. `{key: unknown}`.\n *\n * @experimental 21.0.0\n */\nexport type RemoveStringIndexUnknownKey<K, V> = string extends K\n ? unknown extends V\n ? never\n : K\n : K;\n\n/**\n * Utility type that recursively ignores unknown string index properties on the given object.\n * We use this on the `TSchema` type in `validateStandardSchema` in order to accommodate Zod's\n * `looseObject` which includes `{[key: string]: unknown}` as part of the type.\n *\n * @experimental 21.0.0\n */\nexport type IgnoreUnknownProperties<T> =\n T extends Record<PropertyKey, unknown>\n ? {\n [K in keyof T as RemoveStringIndexUnknownKey<K, T[K]>]: IgnoreUnknownProperties<T[K]>;\n }\n : T;\n\n/**\n * Validates a field using a `StandardSchemaV1` compatible validator (e.g. a Zod validator).\n *\n * See https://github.com/standard-schema/standard-schema for more about standard schema.\n *\n * @param path The `FieldPath` to the field to validate.\n * @param schema The standard schema compatible validator to use for validation.\n * @template TSchema The type validated by the schema. This may be either the full `TValue` type,\n * or a partial of it.\n * @template TValue The type of value stored in the field being validated.\n *\n * @see [Signal Form Schema Validation](guide/forms/signals/validation#integration-with-schema-validation-libraries)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateStandardSchema<TSchema, TModel extends IgnoreUnknownProperties<TSchema>>(\n path: SchemaPath<TModel> & SchemaPathTree<TModel>,\n schema: StandardSchemaV1<TSchema>,\n) {\n // We create both a sync and async validator because the standard schema validator can return\n // either a sync result or a Promise, and we need to handle both cases. The sync validator\n // handles the sync result, and the async validator handles the Promise.\n // We memoize the result of the validation function here, so that it is only run once for both\n // validators, it can then be passed through both sync & async validation.\n type Result = StandardSchemaV1.Result<TSchema> | Promise<StandardSchemaV1.Result<TSchema>>;\n const VALIDATOR_MEMO = metadata(\n path as SchemaPath<TModel>,\n createMetadataKey<Result>(),\n ({value}) => {\n return schema['~standard'].validate(value());\n },\n );\n\n validateTree<TModel>(path, ({state, fieldTreeOf}) => {\n // Skip sync validation if the result is a Promise.\n const result = state.metadata(VALIDATOR_MEMO)!();\n if (ɵisPromise(result)) {\n return [];\n }\n return (\n result?.issues?.map((issue) =>\n standardIssueToFormTreeError(fieldTreeOf<TModel>(path), issue),\n ) ?? []\n );\n });\n\n validateAsync<\n TModel,\n Promise<StandardSchemaV1.Result<TSchema>> | undefined,\n readonly StandardSchemaV1.Issue[]\n >(path, {\n params: ({state}) => {\n // Skip async validation if the result is *not* a Promise.\n const result = state.metadata(VALIDATOR_MEMO)!();\n return ɵisPromise(result) ? result : undefined;\n },\n factory: (params) => {\n return resource({\n params,\n loader: async ({params}) => (await params)?.issues ?? [],\n });\n },\n onSuccess: (issues, {fieldTreeOf}) => {\n return issues.map((issue) => standardIssueToFormTreeError(fieldTreeOf<TModel>(path), issue));\n },\n onError: () => {},\n });\n}\n\n/**\n * Converts a `StandardSchemaV1.Issue` to a `FormTreeError`.\n *\n * @param fieldTree The root field to which the issue's path is relative.\n * @param issue The `StandardSchemaV1.Issue` to convert.\n * @returns A `ValidationError` representing the issue.\n */\nfunction standardIssueToFormTreeError(\n fieldTree: FieldTree<unknown>,\n issue: StandardSchemaV1.Issue,\n): StandardSchemaValidationError {\n let target = fieldTree as FieldTree<Record<PropertyKey, unknown>>;\n for (const pathPart of issue.path ?? []) {\n const pathKey = typeof pathPart === 'object' ? pathPart.key : pathPart;\n target = target[pathKey] as FieldTree<Record<PropertyKey, unknown>>;\n }\n return addDefaultField(standardSchemaError(issue, {message: issue.message}), target);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {httpResource, HttpResourceOptions, HttpResourceRequest} from '@angular/common/http';\nimport {Signal} from '@angular/core';\nimport {\n FieldContext,\n SchemaPath,\n PathKind,\n TreeValidationResult,\n SchemaPathRules,\n} from '../../types';\nimport {MapToErrorsFn, validateAsync} from './validate_async';\n\n/**\n * Options that indicate how to create an httpResource for async validation for a field,\n * and map its result to validation errors.\n *\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the httpResource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @category validation\n * @experimental 21.0.0\n */\nexport interface HttpValidatorOptions<TValue, TResult, TPathKind extends PathKind = PathKind.Root> {\n /**\n * A function that receives the field context and returns the url or request for the httpResource.\n * If given a URL, the underlying httpResource will perform an HTTP GET on it.\n *\n * @param ctx The field context for the field being validated.\n * @returns The URL or request for creating the httpResource.\n */\n readonly request:\n | ((ctx: FieldContext<TValue, TPathKind>) => string | undefined)\n | ((ctx: FieldContext<TValue, TPathKind>) => HttpResourceRequest | undefined);\n\n /**\n * A function that takes the httpResource result, and the current field context and maps it to a\n * list of validation errors.\n *\n * @param result The httpResource result.\n * @param ctx The context for the field the validator is attached to.\n * @return A validation error, or list of validation errors to report based on the httpResource result.\n * The returned errors can optionally specify a field that the error should be targeted to.\n * A targeted error will show up as an error on its target field rather than the field being validated.\n * If a field is not given, the error is assumed to apply to the field being validated.\n */\n readonly onSuccess: MapToErrorsFn<TValue, TResult, TPathKind>;\n\n /**\n * A function to handle errors thrown by httpResource (HTTP errors, network errors, etc.).\n * Receives the error and the field context, returns a list of validation errors.\n */\n readonly onError: (error: unknown, ctx: FieldContext<TValue, TPathKind>) => TreeValidationResult;\n /**\n * The options to use when creating the httpResource.\n */\n readonly options?: HttpResourceOptions<TResult, unknown>;\n}\n\n/**\n * Adds async validation to the field corresponding to the given path based on an httpResource.\n * Async validation for a field only runs once all synchronous validation is passing.\n *\n * @param path A path indicating the field to bind the async validation logic to.\n * @param opts The http validation options.\n * @template TValue The type of value stored in the field being validated.\n * @template TResult The type of result returned by the httpResource\n * @template TPathKind The kind of path being validated (a root path, child path, or item of an array)\n *\n * @see [Signal Form Async Validation](guide/forms/signals/validation#async-validation)\n * @category validation\n * @experimental 21.0.0\n */\nexport function validateHttp<TValue, TResult = unknown, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n opts: HttpValidatorOptions<TValue, TResult, TPathKind>,\n) {\n validateAsync(path, {\n params: opts.request,\n factory: (request: Signal<any>) => httpResource(request, opts.options),\n onSuccess: opts.onSuccess,\n onError: opts.onError,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DEBOUNCER} from '../../field/debounce';\nimport {FieldPathNode} from '../../schema/path_node';\nimport {assertPathIsCurrent} from '../../schema/schema';\nimport type {Debouncer, PathKind, SchemaPath, SchemaPathRules} from '../types';\n\n/**\n * Configures the frequency at which a form field is updated by UI events.\n *\n * When this rule is applied, updates from the UI to the form model will be delayed until either\n * the field is touched, or the most recently debounced update resolves.\n *\n * @param path The target path to debounce.\n * @param durationOrDebouncer Either a debounce duration in milliseconds, or a custom\n * {@link Debouncer} function.\n *\n * @experimental 21.0.0\n */\nexport function debounce<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n durationOrDebouncer: number | Debouncer<TValue, TPathKind>,\n): void {\n assertPathIsCurrent(path);\n\n const pathNode = FieldPathNode.unwrapFieldPath(path);\n const debouncer =\n typeof durationOrDebouncer === 'function'\n ? durationOrDebouncer\n : durationOrDebouncer > 0\n ? debounceForDuration(durationOrDebouncer)\n : immediate;\n pathNode.builder.addMetadataRule(DEBOUNCER, () => debouncer);\n}\n\nfunction debounceForDuration(durationInMilliseconds: number): Debouncer<unknown> {\n return (_context, abortSignal) => {\n return new Promise((resolve) => {\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n const onAbort = () => {\n clearTimeout(timeoutId);\n };\n\n timeoutId = setTimeout(() => {\n abortSignal.removeEventListener('abort', onAbort);\n resolve();\n }, durationInMilliseconds);\n\n abortSignal.addEventListener('abort', onAbort, {once: true});\n });\n };\n}\n\nfunction immediate() {}\n"],"names":["SIGNAL_FORMS_CONFIG","InjectionToken","ngDevMode","provideSignalFormsConfig","config","provide","useValue","InteropNgControl","field","constructor","control","value","valid","invalid","pending","disabled","enabled","errors","length","errObj","error","kind","pristine","dirty","touched","untouched","status","RuntimeError","valueAccessor","hasValidator","validator","Validators","required","updateValueAndValidity","FORM_FIELD","controlInstructions","create","createControlBinding","update","updateControlBinding","FormField","element","inject","ElementRef","nativeElement","injector","Injector","fieldTree","input","alias","state","computed","debugName","bindingOptions","signal","undefined","parseErrors","map","err","formField","filter","ɵCONTROL","optional","classes","Object","entries","className","computation","controlValueAccessors","NG_VALUE_ACCESSOR","self","interopNgControl","ɵinteropControl","getOrCreateNgControl","registerAsBinding","untracked","set","effect","onCleanup","fieldNode","nodeState","formFieldBindings","controls","c","focus","options","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","providers","useExisting","NgControl","useFactory","exportAs","ngImport","decorators","args","path","logic","assertPathIsCurrent","pathNode","FieldPathNode","unwrapFieldPath","builder","addDisabledReasonRule","ctx","result","message","hidden","addHiddenRule","readonly","addReadonlyRule","getLengthOrSize","v","size","getOption","opt","Function","isEmpty","isNaN","validate","addSyncErrorRule","addDefaultField","requiredError","RequiredValidationError","minError","min","MinValidationError","maxError","max","MaxValidationError","minLengthError","minLength","MinLengthValidationError","maxLengthError","maxLength","MaxLengthValidationError","patternError","pattern","PatternValidationError","emailError","EmailValidationError","standardSchemaError","issue","StandardSchemaValidationError","_NgValidationError","__brand","assign","NgValidationError","EMAIL_REGEXP","email","test","maxValue","MAX_MEMO","metadata","createMetadataKey","MAX","Number","numValue","NaN","MAX_LENGTH_MEMO","MAX_LENGTH","minValue","MIN_MEMO","MIN","MIN_LENGTH_MEMO","MIN_LENGTH","PATTERN_MEMO","RegExp","PATTERN","REQUIRED_MEMO","when","REQUIRED","validateAsync","opts","RESOURCE","createManagedMetadataKey","factory","node","stateOf","validationState","shouldSkipValidation","syncValid","params","addAsyncErrorRule","res","hasValue","onSuccess","onError","validateTree","addSyncTreeErrorRule","validateStandardSchema","schema","VALIDATOR_MEMO","fieldTreeOf","ɵisPromise","issues","standardIssueToFormTreeError","resource","loader","pathPart","pathKey","key","validateHttp","request","httpResource","debounce","durationOrDebouncer","debouncer","debounceForDuration","immediate","addMetadataRule","DEBOUNCER","durationInMilliseconds","_context","abortSignal","Promise","resolve","timeoutId","onAbort","clearTimeout","setTimeout","removeEventListener","addEventListener","once"],"mappings":";;;;;;;;;;;;;;AAYO,MAAMA,mBAAmB,GAAG,IAAIC,cAAc,CACnD,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,GAAG,qBAAqB,GAAG,EAAE,CAC3E;;ACaK,SAAUC,wBAAwBA,CAACC,MAAyB,EAAA;AAChE,EAAA,OAAO,CAAC;AAACC,IAAAA,OAAO,EAAEL,mBAAmB;AAAEM,IAAAA,QAAQ,EAAEF;AAAO,GAAA,CAAC;AAC3D;;MCwBaG,gBAAgB,CAAA;EAKLC,KAAA;EAAtBC,WAAAA,CAAsBD,KAAgC,EAAA;IAAhC,IAAK,CAAAA,KAAA,GAALA,KAAK;AAA8B;AAEhDE,EAAAA,OAAO,GAA8B,IAA4C;EAE1F,IAAIC,KAAKA,GAAA;IACP,OAAO,IAAI,CAACH,KAAK,EAAE,CAACG,KAAK,EAAE;AAC7B;EAEA,IAAIC,KAAKA,GAAA;IACP,OAAO,IAAI,CAACJ,KAAK,EAAE,CAACI,KAAK,EAAE;AAC7B;EAEA,IAAIC,OAAOA,GAAA;IACT,OAAO,IAAI,CAACL,KAAK,EAAE,CAACK,OAAO,EAAE;AAC/B;EAEA,IAAIC,OAAOA,GAAA;IACT,OAAO,IAAI,CAACN,KAAK,EAAE,CAACM,OAAO,EAAE;AAC/B;EAEA,IAAIC,QAAQA,GAAA;IACV,OAAO,IAAI,CAACP,KAAK,EAAE,CAACO,QAAQ,EAAE;AAChC;EAEA,IAAIC,OAAOA,GAAA;IACT,OAAO,CAAC,IAAI,CAACR,KAAK,EAAE,CAACO,QA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|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/forms",
|
|
3
|
-
"version": "21.1
|
|
3
|
+
"version": "21.2.0-next.1",
|
|
4
4
|
"description": "Angular - directives and services for creating forms",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"@standard-schema/spec": "^1.0.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@angular/core": "21.1
|
|
16
|
-
"@angular/common": "21.1
|
|
17
|
-
"@angular/platform-browser": "21.1
|
|
15
|
+
"@angular/core": "21.2.0-next.1",
|
|
16
|
+
"@angular/common": "21.2.0-next.1",
|
|
17
|
+
"@angular/platform-browser": "21.2.0-next.1",
|
|
18
18
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
Binary file
|