Skip to content

Commit

Permalink
Updated description of validationError
Browse files Browse the repository at this point in the history
  • Loading branch information
JPMeehan committed Nov 7, 2024
1 parent ab4bbbd commit 884f225
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/foundry/common/data/fields.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare global {
* Can this field only be modified by a gamemaster or assistant gamemaster?
* @defaultValue `false`
*/
gmOnly?: boolean | undefined
gmOnly?: boolean | undefined;

/** The initial value of a field, or a function which assigns that initial value. */
initial?:
Expand All @@ -64,7 +64,9 @@ declare global {

/**
* A custom validation error string. When displayed will be prepended with the
* document name, field name, and candidate value.
* document name, field name, and candidate value. This error string is only
* used when the return type of the validate function is a boolean. If an Error
* is thrown in the validate function, the string message of that Error is used.
*/
validationError?: string | undefined;
}
Expand Down Expand Up @@ -149,6 +151,12 @@ declare abstract class DataField<
*/
nullable: boolean;

/**
* Can this field only be modified by a gamemaster or assistant gamemaster?
* @defaultValue `false`
*/
gmOnly: boolean;

/**
* The initial value of a field, or a function which assigns that initial value.
* @defaultValue `undefined`
Expand Down Expand Up @@ -176,7 +184,9 @@ declare abstract class DataField<

/**
* A custom validation error string. When displayed will be prepended with the
* document name, field name, and candidate value.
* document name, field name, and candidate value. This error string is only
* used when the return type of the validate function is a boolean. If an Error
* is thrown in the validate function, the string message of that Error is used.
* @defaultValue `"is not a valid value"`
*/
validationError: string;
Expand Down

0 comments on commit 884f225

Please sign in to comment.