pdap-design-system 2.3.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
|
|
1
1
|
import { PdapFormValidator, PdapFormValidators, PdapLengthRules } from 'src/components/Form/types.ts';
|
2
|
-
|
3
|
-
* Type predicate to ensure the passed validator is a valid one.
|
4
|
-
* @param s string to check against keys of the vuelidate validators object
|
5
|
-
*/
|
2
|
+
export declare const password: any;
|
6
3
|
export declare function isPdapVuelidateValidator(s: string): s is keyof PdapFormValidators;
|
7
4
|
export declare function isLengthRule(s: string): s is PdapLengthRules;
|
5
|
+
export declare function isRequiredRule(s: string): s is 'required';
|
6
|
+
export declare function isEmailRule(s: string): s is 'email';
|
7
|
+
export declare function isPasswordRule(s: string): s is 'password';
|
8
8
|
export declare function makeLengthRule(rule: PdapLengthRules, value: number): {
|
9
9
|
[x: string]: import("@vuelidate/core").ValidationRuleWithParams<{
|
10
10
|
max: number;
|
@@ -21,6 +21,18 @@ export declare function makeRequiredRule(): {
|
|
21
21
|
export declare function makeRequiredRuleWithCustomMessage(message: string): {
|
22
22
|
required: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
23
23
|
};
|
24
|
+
export declare function makeEmailRule(): {
|
25
|
+
email: import("@vuelidate/core").ValidationRuleWithoutParams<any>;
|
26
|
+
};
|
27
|
+
export declare function makeEmailRuleWithCustomMessage(message: string): {
|
28
|
+
email: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
29
|
+
};
|
30
|
+
export declare function makePasswordRule(): {
|
31
|
+
password: any;
|
32
|
+
};
|
33
|
+
export declare function makePasswordRuleWithCustomMessage(message: string): {
|
34
|
+
password: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
35
|
+
};
|
24
36
|
export declare function createRule<T extends PdapFormValidator<number | boolean>>(rule: string, validator: T): {
|
25
37
|
[x: string]: import("@vuelidate/core").ValidationRuleWithParams<{
|
26
38
|
max: number;
|
@@ -33,4 +45,10 @@ export declare function createRule<T extends PdapFormValidator<number | boolean>
|
|
33
45
|
required: import("@vuelidate/core").ValidationRuleWithoutParams<any>;
|
34
46
|
} | {
|
35
47
|
required: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
48
|
+
} | {
|
49
|
+
email: import("@vuelidate/core").ValidationRuleWithoutParams<any>;
|
50
|
+
} | {
|
51
|
+
email: import("@vuelidate/core").ValidationRuleWithParams<object, any>;
|
52
|
+
} | {
|
53
|
+
password: any;
|
36
54
|
};
|