Skip to content

Commit

Permalink
fix(types): missing features from latest commits
Browse files Browse the repository at this point in the history
Added new options from fomantic#2941 and fomantic#2949
  • Loading branch information
lubber-de committed Feb 11, 2024
1 parent a2a24eb commit 1ec98a7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions types/fomantic-ui-form.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ declare namespace FomanticUI {
(behavior: 'set as clean'): JQuery;

/**
* Automatically adds the "empty" rule or automatically checks a checkbox for all fields with classname or attribute 'required'.
* Automatically adds the "notEmpty" rule or automatically checks a checkbox for all fields with classname or attribute 'required'.
*/
(behavior: 'set auto check'): void;

Expand Down Expand Up @@ -256,7 +256,7 @@ declare namespace FomanticUI {
preventLeaving: boolean;

/**
* Whether fields with classname or attribute 'required' should automatically add the "empty" rule or automatically checks checkbox fields.
* Whether fields with classname or attribute 'required' should automatically add the "notEmpty" rule or automatically checks checkbox fields.
* @default false
*/
autoCheckRequired: boolean;
Expand All @@ -273,6 +273,12 @@ declare namespace FomanticUI {
*/
errorLimit: number;

/**
*
* @default false
*/
noNativeValidation: boolean;

// endregion

// region Form Prompts
Expand Down Expand Up @@ -440,9 +446,15 @@ declare namespace FomanticUI {

/**
* @default '{name} must have a value'
* @deprecated Use notEmpty instead
*/
empty: string;

/**
* @default '{name} must have a value'
*/
notEmpty: string;

/**
* @default '{name} must be checked'
*/
Expand Down Expand Up @@ -574,6 +586,7 @@ declare namespace FomanticUI {

interface Rules {
empty(value: unknown): boolean;
notEmpty(value: unknown): boolean;
checked(): boolean;
email(value: unknown): boolean;
url(value: unknown): boolean;
Expand Down

0 comments on commit 1ec98a7

Please sign in to comment.