@angular/forms 20.3.9 → 20.3.11
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/README.md +1 -2
- package/fesm2022/forms.mjs +136 -122
- package/fesm2022/forms.mjs.map +1 -1
- package/index.d.ts +26 -1
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.3.
|
|
2
|
+
* @license Angular v20.3.11
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -604,6 +604,8 @@ declare class CheckboxControlValueAccessor extends BuiltInControlValueAccessor i
|
|
|
604
604
|
* @description
|
|
605
605
|
* Defines the map of errors returned from failed validation checks.
|
|
606
606
|
*
|
|
607
|
+
* @see [Defining custom validators](guide/forms/form-validation#defining-custom-validators)
|
|
608
|
+
*
|
|
607
609
|
* @publicApi
|
|
608
610
|
*/
|
|
609
611
|
type ValidationErrors = {
|
|
@@ -765,6 +767,8 @@ declare class MinValidator extends AbstractValidatorDirective {
|
|
|
765
767
|
* }
|
|
766
768
|
* ```
|
|
767
769
|
*
|
|
770
|
+
* @see [Creating asynchronous validators](guide/forms/form-validation#creating-asynchronous-validators)
|
|
771
|
+
*
|
|
768
772
|
* @publicApi
|
|
769
773
|
*/
|
|
770
774
|
interface AsyncValidator extends Validator {
|
|
@@ -877,6 +881,8 @@ declare class EmailValidator extends AbstractValidatorDirective {
|
|
|
877
881
|
* A function that receives a control and synchronously returns a map of
|
|
878
882
|
* validation errors if present, otherwise null.
|
|
879
883
|
*
|
|
884
|
+
* @see [Defining custom validators](guide/forms/form-validation#defining-custom-validators)
|
|
885
|
+
*
|
|
880
886
|
* @publicApi
|
|
881
887
|
*/
|
|
882
888
|
interface ValidatorFn {
|
|
@@ -887,6 +893,8 @@ interface ValidatorFn {
|
|
|
887
893
|
* A function that receives a control and returns a Promise or observable
|
|
888
894
|
* that emits validation errors if present, otherwise null.
|
|
889
895
|
*
|
|
896
|
+
* @see [Creating asynchronous validators](guide/forms/form-validation#creating-asynchronous-validators)
|
|
897
|
+
*
|
|
890
898
|
* @publicApi
|
|
891
899
|
*/
|
|
892
900
|
interface AsyncValidatorFn {
|
|
@@ -1065,6 +1073,9 @@ type ɵFormArrayRawValue<T extends AbstractControl<any>> = ɵTypedOrUntyped<T, A
|
|
|
1065
1073
|
* the `FormArray` directly, as that result in strange and unexpected behavior such
|
|
1066
1074
|
* as broken change detection.
|
|
1067
1075
|
*
|
|
1076
|
+
* @see [FormArray: Dynamic, Homogenous Collections](guide/forms/typed-forms#formcontrol-getting-started)
|
|
1077
|
+
* @see [Creating dynamic forms](guide/forms/reactive-forms#creating-dynamic-forms)
|
|
1078
|
+
*
|
|
1068
1079
|
* @publicApi
|
|
1069
1080
|
*/
|
|
1070
1081
|
declare class FormArray<TControl extends AbstractControl<any> = any> extends AbstractControl<ɵTypedOrUntyped<TControl, ɵFormArrayValue<TControl>, any>, ɵTypedOrUntyped<TControl, ɵFormArrayRawValue<TControl>, any>> {
|
|
@@ -1578,6 +1589,9 @@ interface ɵFormControlCtor {
|
|
|
1578
1589
|
* console.log(control.value); // 'Drew'
|
|
1579
1590
|
* console.log(control.status); // 'DISABLED'
|
|
1580
1591
|
* ```
|
|
1592
|
+
*
|
|
1593
|
+
* @see [FormControl: Getting Started](guide/forms/typed-forms#formcontrol-getting-started)
|
|
1594
|
+
*
|
|
1581
1595
|
*/
|
|
1582
1596
|
interface FormControl<TValue = any> extends AbstractControl<TValue> {
|
|
1583
1597
|
/**
|
|
@@ -1865,6 +1879,9 @@ type ɵOptionalKeys<T> = {
|
|
|
1865
1879
|
* Notice that `c.value.one` has type `string|null|undefined`. This is because calling `c.reset({})`
|
|
1866
1880
|
* without providing the optional key `one` will cause it to become `null`.
|
|
1867
1881
|
*
|
|
1882
|
+
* @see [Grouping form controls](guide/forms/reactive-forms#grouping-form-controls)
|
|
1883
|
+
* @see [FormGroup and FormRecord](guide/forms/typed-forms#formgroup-and-formrecord)
|
|
1884
|
+
*
|
|
1868
1885
|
* @publicApi
|
|
1869
1886
|
*/
|
|
1870
1887
|
declare class FormGroup<TControl extends {
|
|
@@ -2152,6 +2169,8 @@ declare const isFormGroup: (control: unknown) => control is FormGroup;
|
|
|
2152
2169
|
* numbers.removeControl('bill');
|
|
2153
2170
|
* ```
|
|
2154
2171
|
*
|
|
2172
|
+
* @see [FormGroup and FormRecord](guide/forms/typed-forms#formgroup-and-formrecord)
|
|
2173
|
+
*
|
|
2155
2174
|
* @publicApi
|
|
2156
2175
|
*/
|
|
2157
2176
|
declare class FormRecord<TControl extends AbstractControl = AbstractControl> extends FormGroup<{
|
|
@@ -4802,6 +4821,8 @@ declare class FormBuilder {
|
|
|
4802
4821
|
* `NonNullableFormBuilder` is similar to {@link FormBuilder}, but automatically constructed
|
|
4803
4822
|
* {@link FormControl} elements have `{nonNullable: true}` and are non-nullable.
|
|
4804
4823
|
*
|
|
4824
|
+
* @see [FormBuilder and NonNullableFormBuilder](guide/forms/typed-forms#formbuilder-and-nonnullableformbuilder)
|
|
4825
|
+
*
|
|
4805
4826
|
* @publicApi
|
|
4806
4827
|
*/
|
|
4807
4828
|
declare abstract class NonNullableFormBuilder {
|
|
@@ -4890,6 +4911,8 @@ declare class UntypedFormBuilder extends FormBuilder {
|
|
|
4890
4911
|
* }
|
|
4891
4912
|
* ```
|
|
4892
4913
|
*
|
|
4914
|
+
* @see [Defining custom validators](guide/forms/form-validation#defining-custom-validators)
|
|
4915
|
+
*
|
|
4893
4916
|
* @publicApi
|
|
4894
4917
|
*/
|
|
4895
4918
|
declare const NG_VALIDATORS: InjectionToken<readonly (Function | Validator)[]>;
|
|
@@ -4920,6 +4943,8 @@ declare const NG_VALIDATORS: InjectionToken<readonly (Function | Validator)[]>;
|
|
|
4920
4943
|
* }
|
|
4921
4944
|
* ```
|
|
4922
4945
|
*
|
|
4946
|
+
* @see [Implementing a custom async validator](guide/forms/form-validation#implementing-a-custom-async-validator)
|
|
4947
|
+
*
|
|
4923
4948
|
* @publicApi
|
|
4924
4949
|
*/
|
|
4925
4950
|
declare const NG_ASYNC_VALIDATORS: InjectionToken<readonly (Function | Validator)[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/forms",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.11",
|
|
4
4
|
"description": "Angular - directives and services for creating forms",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"tslib": "^2.3.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@angular/core": "20.3.
|
|
15
|
-
"@angular/common": "20.3.
|
|
16
|
-
"@angular/platform-browser": "20.3.
|
|
14
|
+
"@angular/core": "20.3.11",
|
|
15
|
+
"@angular/common": "20.3.11",
|
|
16
|
+
"@angular/platform-browser": "20.3.11",
|
|
17
17
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|