You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@angular/forms

Package Overview
Dependencies
Maintainers
2
Versions
1010
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/forms - npm Package Compare versions

Comparing version
21.2.0-rc.0
to
21.2.0
+1
-1
fesm2022/_validation_errors-chunk.mjs
/**
* @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

/**
* @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,

{
"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

/**
* @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