@angular/forms
Advanced tools
| /** | ||
| * @license Angular v21.2.0-rc.0 | ||
| * @license Angular v21.2.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.0-rc.0 | ||
| * @license Angular v21.2.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
+19
-9
| /** | ||
| * @license Angular v21.2.0-rc.0 | ||
| * @license Angular v21.2.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -71,2 +71,11 @@ * License: MIT | ||
| } | ||
| function normalizeErrors(error) { | ||
| if (error === undefined) { | ||
| return []; | ||
| } | ||
| if (Array.isArray(error)) { | ||
| return error; | ||
| } | ||
| return [error]; | ||
| } | ||
@@ -484,6 +493,7 @@ function validate(path, logic) { | ||
| const result = parse(rawValue); | ||
| errors.set(result.errors ?? []); | ||
| errors.set(normalizeErrors(result.error)); | ||
| if (result.value !== undefined) { | ||
| setValue(result.value); | ||
| } | ||
| errors.set(normalizeErrors(result.error)); | ||
| }; | ||
@@ -647,3 +657,3 @@ return { | ||
| return { | ||
| errors: [new NativeInputParseError()] | ||
| error: new NativeInputParseError() | ||
| }; | ||
@@ -1026,3 +1036,3 @@ } | ||
| minVersion: "12.0.0", | ||
| version: "21.2.0-rc.0", | ||
| version: "21.2.0", | ||
| ngImport: i0, | ||
@@ -1035,3 +1045,3 @@ type: FormField, | ||
| minVersion: "17.1.0", | ||
| version: "21.2.0-rc.0", | ||
| version: "21.2.0", | ||
| type: FormField, | ||
@@ -1068,3 +1078,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.0-rc.0", | ||
| version: "21.2.0", | ||
| ngImport: i0, | ||
@@ -1114,3 +1124,3 @@ type: FormField, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.0-rc.0", | ||
| version: "21.2.0", | ||
| ngImport: i0, | ||
@@ -1123,3 +1133,3 @@ type: FormRoot, | ||
| minVersion: "17.1.0", | ||
| version: "21.2.0-rc.0", | ||
| version: "21.2.0", | ||
| type: FormRoot, | ||
@@ -1150,3 +1160,3 @@ isStandalone: true, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.0-rc.0", | ||
| version: "21.2.0", | ||
| ngImport: i0, | ||
@@ -1153,0 +1163,0 @@ type: FormRoot, |
+4
-4
| { | ||
| "name": "@angular/forms", | ||
| "version": "21.2.0-rc.0", | ||
| "version": "21.2.0", | ||
| "description": "Angular - directives and services for creating forms", | ||
@@ -15,5 +15,5 @@ "author": "angular", | ||
| "peerDependencies": { | ||
| "@angular/core": "21.2.0-rc.0", | ||
| "@angular/common": "21.2.0-rc.0", | ||
| "@angular/platform-browser": "21.2.0-rc.0", | ||
| "@angular/core": "21.2.0", | ||
| "@angular/common": "21.2.0", | ||
| "@angular/platform-browser": "21.2.0", | ||
| "rxjs": "^6.5.3 || ^7.4.0" | ||
@@ -20,0 +20,0 @@ }, |
| /** | ||
| * @license Angular v21.2.0-rc.0 | ||
| * @license Angular v21.2.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
+13
-5
| /** | ||
| * @license Angular v21.2.0-rc.0 | ||
| * @license Angular v21.2.0 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -551,3 +551,3 @@ * License: MIT | ||
| /** | ||
| * The parsed value, if parsing was successful. | ||
| * The parsed value. If omitted, the model is not updated. | ||
| */ | ||
@@ -558,3 +558,3 @@ readonly value?: TValue; | ||
| */ | ||
| readonly errors?: readonly ValidationError.WithoutFieldTree[]; | ||
| readonly error?: OneOrMany<ValidationError.WithoutFieldTree>; | ||
| } | ||
@@ -572,3 +572,3 @@ /** | ||
| * - `value`: The parsed model value. If `undefined`, the model will not be updated. | ||
| * - `errors`: Any parse errors encountered. If `undefined`, no errors are reported. | ||
| * - `error`: Any parse errors encountered. If `undefined`, no errors are reported. | ||
| */ | ||
@@ -602,2 +602,10 @@ parse: (rawValue: TRaw) => ParseResult<TValue>; | ||
| * | ||
| * Parse errors are exposed via the returned signal’s `parseErrors()` property. | ||
| * When `transformedValue` is used within a Signal Forms field context, parse errors are also | ||
| * reported to the nearest field automatically. When no field context is present, no automatic | ||
| * reporting occurs and `parseErrors` can be consumed directly. | ||
| * | ||
| * Note: `parse` may return both a `value` and an `error`. Returning `value` updates the model; | ||
| * omitting it leaves the model unchanged. | ||
| * | ||
| * @param value The model signal to synchronize with. | ||
@@ -622,3 +630,3 @@ * @param options Configuration including `parse` and `format` functions. | ||
| * if (Number.isNaN(num)) { | ||
| * return {errors: [{kind: 'parse', message: `${val} is not numeric`}]}; | ||
| * return {error: {kind: 'parse', message: `${val} is not numeric`}}; | ||
| * } | ||
@@ -625,0 +633,0 @@ * return {value: num}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1573559
0.03%16748
0.11%1
-50%81
-1.22%