@@ -24,6 +24,9 @@ import type {FieldState, LogicFn, PathKind, SchemaPath, SchemaPathRules} from '.
2424 * @template TKey The type of metadata key.
2525 * @template TPathKind The kind of path the logic is bound to (a root path, child path, or item of an array)
2626 *
27+ * @see [Field metadata](guide/forms/signals/field-metadata)
28+ * @see [Setting values from a schema](guide/forms/signals/field-metadata#setting-values-from-a-schema)
29+ *
2730 * @category logic
2831 * @publicApi 22.0
2932 */
@@ -55,6 +58,9 @@ export function metadata<
5558 *
5659 * @template TAcc The accumulated type of the reduce operation.
5760 * @template TItem The type of the individual items that are reduced over.
61+ *
62+ * @see [Combining contributions with reducers](guide/forms/signals/field-metadata#combining-contributions-with-reducers)
63+ *
5864 * @publicApi 22.0
5965 */
6066export interface MetadataReducer < TAcc , TItem > {
@@ -130,6 +136,8 @@ function override<T>(getInitial?: () => T): MetadataReducer<T | undefined, T> {
130136/**
131137 * A symbol used to tag a `MetadataKey` as representing an asynchronous validation resource.
132138 *
139+ * @see [Async validation](guide/forms/signals/validation#async-validation)
140+ *
133141 * @category validation
134142 * @publicApi 22.0
135143 */
@@ -145,6 +153,8 @@ export const IS_ASYNC_VALIDATION_RESOURCE: unique symbol = Symbol('IS_ASYNC_VALI
145153 * @template TWrite The type written to this key using the `metadata()` rule
146154 * @template TAcc The type of the reducer's accumulated value.
147155 *
156+ * @see [Field metadata](guide/forms/signals/field-metadata)
157+ *
148158 * @publicApi 22.0
149159 */
150160export class MetadataKey < TRead , TWrite , TAcc > {
@@ -164,6 +174,9 @@ export class MetadataKey<TRead, TWrite, TAcc> {
164174 * Represents metadata that is used to define a valid limit for a field.
165175 *
166176 * @template TLimit The type the limit value.
177+ *
178+ * @see [Validation constraints](guide/forms/signals/custom-controls#validation-constraints)
179+ *
167180 * @publicApi 22.0
168181 */
169182export type LimitKey < TLimit > = MetadataKey <
@@ -183,6 +196,8 @@ declare const LIMIT_SELECTION_KEY: unique symbol;
183196 * This indirection allows rules to bind a {@link LimitKey} of a specific limit type (e.g. `number`
184197 * or `Date`) matching the field's type to a generic {@link MetadataKey}.
185198 *
199+ * @see [Validation constraints](guide/forms/signals/custom-controls#validation-constraints)
200+ *
186201 * @publicApi 22.0
187202 */
188203export type LimitSelectionKey = MetadataKey <
@@ -198,6 +213,8 @@ export type LimitSelectionKey = MetadataKey<
198213 *
199214 * @template TKey The `MetadataKey` type
200215 *
216+ * @see [Field metadata](guide/forms/signals/field-metadata)
217+ *
201218 * @publicApi 22.0
202219 */
203220export type MetadataSetterType < TKey > =
@@ -209,6 +226,8 @@ export type MetadataSetterType<TKey> =
209226 *
210227 * @template TWrite The type written to this key using the `metadata()` rule
211228 *
229+ * @see [Creating a metadata key](guide/forms/signals/field-metadata#creating-a-metadata-key)
230+ *
212231 * @publicApi 22.0
213232 */
214233export function createMetadataKey < TWrite > ( ) : MetadataKey <
@@ -223,6 +242,8 @@ export function createMetadataKey<TWrite>(): MetadataKey<
223242 * @template TWrite The type written to this key using the `metadata()` rule
224243 * @template TAcc The type of the reducer's accumulated value.
225244 *
245+ * @see [Creating a metadata key](guide/forms/signals/field-metadata#creating-a-metadata-key)
246+ *
226247 * @publicApi 22.0
227248 */
228249export function createMetadataKey < TWrite , TAcc > (
@@ -247,6 +268,8 @@ export function createMetadataKey<TWrite, TAcc>(
247268 * @template TRead The type read from the `FieldState` for this key
248269 * @template TWrite The type written to this key using the `metadata()` rule
249270 *
271+ * @see [Attaching lifecycle-aware objects with managed metadata](guide/forms/signals/field-metadata#attaching-lifecycle-aware-objects-with-managed-metadata)
272+ *
250273 * @publicApi 22.0
251274 */
252275export function createManagedMetadataKey < TRead , TWrite > (
@@ -265,6 +288,8 @@ export function createManagedMetadataKey<TRead, TWrite>(
265288 * @template TWrite The type written to this key using the `metadata()` rule
266289 * @template TAcc The type of the reducer's accumulated value.
267290 *
291+ * @see [Attaching lifecycle-aware objects with managed metadata](guide/forms/signals/field-metadata#attaching-lifecycle-aware-objects-with-managed-metadata)
292+ *
268293 * @publicApi 22.0
269294 */
270295export function createManagedMetadataKey < TRead , TWrite , TAcc > (
@@ -284,6 +309,8 @@ export function createManagedMetadataKey<TRead, TWrite, TAcc>(
284309/**
285310 * Creates a {@link LimitSelectionKey}.
286311 *
312+ * @see [Validation constraints](guide/forms/signals/custom-controls#validation-constraints)
313+ *
287314 * @publicApi 22.0
288315 */
289316export function createLimitSelectionKey ( ) : LimitSelectionKey {
@@ -293,6 +320,8 @@ export function createLimitSelectionKey(): LimitSelectionKey {
293320/**
294321 * A {@link MetadataKey} representing whether the field is required.
295322 *
323+ * @see [Required validation](guide/forms/signals/validation#required)
324+ *
296325 * @category validation
297326 * @publicApi 22.0
298327 */
@@ -306,6 +335,8 @@ export const REQUIRED: MetadataKey<Signal<boolean>, boolean, boolean> = createMe
306335 * This indirection allows different keys to be used for different types of values with their
307336 * own reducers, such as {@link MIN_DATE} and {@link MIN_NUMBER}.
308337 *
338+ * @see [Minimum and maximum validation](guide/forms/signals/validation#min-and-max)
339+ *
309340 * @category validation
310341 * @publicApi 22.0
311342 */
@@ -314,6 +345,8 @@ export const MIN: LimitSelectionKey = createLimitSelectionKey();
314345/**
315346 * A {@link MetadataKey} representing the minimum valid value of a date field.
316347 *
348+ * @see [Minimum and maximum validation](guide/forms/signals/validation#min-and-max)
349+ *
317350 * @category validation
318351 * @publicApi 22.0
319352 */
@@ -322,6 +355,8 @@ export const MIN_DATE: LimitKey<Date> = createMetadataKey(MetadataReducer.max())
322355/**
323356 * A {@link MetadataKey} representing the minimum valid value of a number field.
324357 *
358+ * @see [Minimum and maximum validation](guide/forms/signals/validation#min-and-max)
359+ *
325360 * @category validation
326361 * @publicApi 22.0
327362 */
@@ -333,6 +368,8 @@ export const MIN_NUMBER: LimitKey<number> = createMetadataKey(MetadataReducer.ma
333368 * This indirection allows different keys to be used for different types of values with their
334369 * own reducers, such as {@link MAX_DATE} and {@link MAX_NUMBER}.
335370 *
371+ * @see [Minimum and maximum validation](guide/forms/signals/validation#min-and-max)
372+ *
336373 * @category validation
337374 * @publicApi 22.0
338375 */
@@ -341,6 +378,8 @@ export const MAX: LimitSelectionKey = createLimitSelectionKey();
341378/**
342379 * A {@link MetadataKey} representing the maximum valid value of a date field.
343380 *
381+ * @see [Minimum and maximum validation](guide/forms/signals/validation#min-and-max)
382+ *
344383 * @category validation
345384 * @publicApi 22.0
346385 */
@@ -349,6 +388,8 @@ export const MAX_DATE: LimitKey<Date> = createMetadataKey(MetadataReducer.min())
349388/**
350389 * A {@link MetadataKey} representing the maximum valid value of a number field.
351390 *
391+ * @see [Minimum and maximum validation](guide/forms/signals/validation#min-and-max)
392+ *
352393 * @category validation
353394 * @publicApi 22.0
354395 */
@@ -357,6 +398,8 @@ export const MAX_NUMBER: LimitKey<number> = createMetadataKey(MetadataReducer.mi
357398/**
358399 * A {@link MetadataKey} representing the min length of the field.
359400 *
401+ * @see [Minimum and maximum length validation](guide/forms/signals/validation#minlength-and-maxlength)
402+ *
360403 * @category validation
361404 * @publicApi 22.0
362405 */
@@ -365,6 +408,8 @@ export const MIN_LENGTH: LimitKey<number> = createMetadataKey(MetadataReducer.ma
365408/**
366409 * A {@link MetadataKey} representing the max length of the field.
367410 *
411+ * @see [Minimum and maximum length validation](guide/forms/signals/validation#minlength-and-maxlength)
412+ *
368413 * @category validation
369414 * @publicApi 22.0
370415 */
@@ -373,6 +418,8 @@ export const MAX_LENGTH: LimitKey<number> = createMetadataKey(MetadataReducer.mi
373418/**
374419 * A {@link MetadataKey} representing the patterns the field must match.
375420 *
421+ * @see [Pattern validation](guide/forms/signals/validation#pattern)
422+ *
376423 * @category validation
377424 * @publicApi 22.0
378425 */
0 commit comments