@sbcore/ng-absolute-validator 14.0.0 → 14.0.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.
- package/esm2020/lib/directive/error-trigger/error-trigger-on.directive.mjs +5 -5
- package/esm2020/lib/ng-absolute-validator.module.mjs +6 -8
- package/esm2020/lib/rule/above/above.directive.mjs +6 -6
- package/esm2020/lib/rule/accepted/accepted.directive.mjs +6 -6
- package/esm2020/lib/rule/after/after.directive.mjs +6 -6
- package/esm2020/lib/rule/alpha/alpha.directive.mjs +6 -6
- package/esm2020/lib/rule/alpha_dash/alpha-dash.directive.mjs +6 -6
- package/esm2020/lib/rule/alpha_numeric/alpha-numeric.directive.mjs +6 -6
- package/esm2020/lib/rule/array/array.directive.mjs +6 -6
- package/esm2020/lib/rule/before/before.directive.mjs +6 -6
- package/esm2020/lib/rule/between/between.directive.mjs +6 -6
- package/esm2020/lib/rule/boolean/boolean.directive.mjs +6 -6
- package/esm2020/lib/rule/confirmed/confirmed.directive.mjs +6 -6
- package/esm2020/lib/rule/credit_card/credit-card.directive.mjs +6 -6
- package/esm2020/lib/rule/cvv/cvv.directive.mjs +6 -6
- package/esm2020/lib/rule/date/date.directive.mjs +6 -6
- package/esm2020/lib/rule/date_format/date-format.directive.mjs +6 -6
- package/esm2020/lib/rule/debit_card/debit-card.directive.mjs +6 -6
- package/esm2020/lib/rule/different/different.directive.mjs +6 -6
- package/esm2020/lib/rule/dimension/dimension.directive.mjs +6 -6
- package/esm2020/lib/rule/email/email.directive.mjs +6 -6
- package/esm2020/lib/rule/ends_with/ends-with.directive.mjs +6 -6
- package/esm2020/lib/rule/equals/equals.directive.mjs +6 -6
- package/esm2020/lib/rule/exists/exists.directive.mjs +6 -6
- package/esm2020/lib/rule/image/image.directive.mjs +7 -7
- package/esm2020/lib/rule/in/in.directive.mjs +6 -6
- package/esm2020/lib/rule/includes/includes.directive.mjs +6 -6
- package/esm2020/lib/rule/integer/integer.directive.mjs +6 -6
- package/esm2020/lib/rule/ip/ip.directive.mjs +6 -6
- package/esm2020/lib/rule/ipv4/ipv4.directive.mjs +6 -6
- package/esm2020/lib/rule/ipv6/ipv6.directive.mjs +6 -6
- package/esm2020/lib/rule/json/json.directive.mjs +6 -6
- package/esm2020/lib/rule/max/max.directive.mjs +6 -6
- package/esm2020/lib/rule/mimes/mimes.directive.mjs +6 -6
- package/esm2020/lib/rule/min/min.directive.mjs +6 -6
- package/esm2020/lib/rule/not_equals/not-equals.directive.mjs +7 -7
- package/esm2020/lib/rule/not_in/not-in.directive.mjs +6 -6
- package/esm2020/lib/rule/not_regex/not-regex.directive.mjs +6 -6
- package/esm2020/lib/rule/number/number.directive.mjs +6 -6
- package/esm2020/lib/rule/phone_no/phone-no.directive.mjs +7 -7
- package/esm2020/lib/rule/range/range.directive.mjs +6 -6
- package/esm2020/lib/rule/regex/regex.directive.mjs +6 -6
- package/esm2020/lib/rule/required/required.directive.mjs +6 -6
- package/esm2020/lib/rule/required_if/required-if.directive.mjs +6 -6
- package/esm2020/lib/rule/required_unless/required-unless.directive.mjs +6 -6
- package/esm2020/lib/rule/required_with/required-with.directive.mjs +6 -6
- package/esm2020/lib/rule/required_with_all/required-with-all.directive.mjs +6 -6
- package/esm2020/lib/rule/required_without/required-without.directive.mjs +6 -6
- package/esm2020/lib/rule/required_without_all/required-without-all.directive.mjs +6 -6
- package/esm2020/lib/rule/rule.directive.mjs +6 -6
- package/esm2020/lib/rule/rule.module.mjs +76 -111
- package/esm2020/lib/rule/same/same.directive.mjs +6 -6
- package/esm2020/lib/rule/size/size.directive.mjs +6 -6
- package/esm2020/lib/rule/starts_with/starts-with.directive.mjs +6 -6
- package/esm2020/lib/rule/strength/strength.directive.mjs +6 -6
- package/esm2020/lib/rule/string/string.directive.mjs +6 -6
- package/esm2020/lib/rule/under/under.directive.mjs +6 -6
- package/esm2020/lib/rule/unique/unique.directive.mjs +6 -6
- package/esm2020/lib/rule/url/url.directive.mjs +6 -6
- package/esm2020/lib/rule/uuid/uuid.directive.mjs +6 -6
- package/esm2020/lib/rule/video/video.directive.mjs +6 -6
- package/fesm2015/sbcore-ng-absolute-validator.mjs +349 -386
- package/fesm2015/sbcore-ng-absolute-validator.mjs.map +1 -1
- package/fesm2020/sbcore-ng-absolute-validator.mjs +347 -384
- package/fesm2020/sbcore-ng-absolute-validator.mjs.map +1 -1
- package/lib/common.utils.d.ts +8 -0
- package/lib/config-interface.d.ts +15 -0
- package/lib/constant.d.ts +61 -0
- package/lib/directive/error-trigger/error-trigger-on.directive.d.ts +3 -3
- package/lib/interface.d.ts +143 -0
- package/lib/ng-absolute-validator.component.d.ts +77 -0
- package/lib/ng-absolute-validator.module.d.ts +1 -1
- package/lib/ng-absolute-validator.service.d.ts +45 -0
- package/lib/rule/above/above.directive.d.ts +3 -3
- package/lib/rule/accepted/accepted.directive.d.ts +3 -3
- package/lib/rule/after/after.directive.d.ts +3 -3
- package/lib/rule/alpha/alpha.directive.d.ts +3 -3
- package/lib/rule/alpha_dash/alpha-dash.directive.d.ts +3 -3
- package/lib/rule/alpha_numeric/alpha-numeric.directive.d.ts +3 -3
- package/lib/rule/array/array.directive.d.ts +3 -3
- package/lib/rule/before/before.directive.d.ts +3 -3
- package/lib/rule/between/between.directive.d.ts +3 -3
- package/lib/rule/boolean/boolean.directive.d.ts +3 -3
- package/lib/rule/confirmed/confirmed.directive.d.ts +3 -3
- package/lib/rule/credit_card/credit-card.directive.d.ts +3 -3
- package/lib/rule/cvv/cvv.directive.d.ts +3 -3
- package/lib/rule/date/date.directive.d.ts +3 -3
- package/lib/rule/date_format/date-format.directive.d.ts +3 -3
- package/lib/rule/debit_card/debit-card.directive.d.ts +3 -3
- package/lib/rule/different/different.directive.d.ts +3 -3
- package/lib/rule/dimension/dimension.directive.d.ts +3 -3
- package/lib/rule/email/email.directive.d.ts +3 -3
- package/lib/rule/ends_with/ends-with.directive.d.ts +3 -3
- package/lib/rule/equals/equals.directive.d.ts +3 -3
- package/lib/rule/exists/exists.directive.d.ts +3 -3
- package/lib/rule/image/image.directive.d.ts +3 -3
- package/lib/rule/in/in.directive.d.ts +3 -3
- package/lib/rule/includes/includes.directive.d.ts +3 -3
- package/lib/rule/integer/integer.directive.d.ts +3 -3
- package/lib/rule/ip/ip.directive.d.ts +3 -3
- package/lib/rule/ipv4/ipv4.directive.d.ts +3 -3
- package/lib/rule/ipv6/ipv6.directive.d.ts +3 -3
- package/lib/rule/json/json.directive.d.ts +3 -3
- package/lib/rule/max/max.directive.d.ts +3 -3
- package/lib/rule/mimes/mimes.directive.d.ts +3 -3
- package/lib/rule/min/min.directive.d.ts +3 -3
- package/lib/rule/not_equals/not-equals.directive.d.ts +3 -3
- package/lib/rule/not_in/not-in.directive.d.ts +3 -3
- package/lib/rule/not_regex/not-regex.directive.d.ts +3 -3
- package/lib/rule/number/number.directive.d.ts +3 -3
- package/lib/rule/phone_no/phone-no.directive.d.ts +3 -3
- package/lib/rule/range/range.directive.d.ts +3 -3
- package/lib/rule/regex/regex.directive.d.ts +3 -3
- package/lib/rule/required/required.directive.d.ts +3 -3
- package/lib/rule/required_if/required-if.directive.d.ts +3 -3
- package/lib/rule/required_unless/required-unless.directive.d.ts +3 -3
- package/lib/rule/required_with/required-with.directive.d.ts +3 -3
- package/lib/rule/required_with_all/required-with-all.directive.d.ts +3 -3
- package/lib/rule/required_without/required-without.directive.d.ts +3 -3
- package/lib/rule/required_without_all/required-without-all.directive.d.ts +3 -3
- package/lib/rule/rule.directive.d.ts +17 -0
- package/lib/rule/rule.module.d.ts +1 -1
- package/lib/rule/same/same.directive.d.ts +3 -3
- package/lib/rule/size/size.directive.d.ts +3 -3
- package/lib/rule/starts_with/starts-with.directive.d.ts +3 -3
- package/lib/rule/strength/strength.directive.d.ts +3 -3
- package/lib/rule/string/string.directive.d.ts +3 -3
- package/lib/rule/under/under.directive.d.ts +3 -3
- package/lib/rule/unique/unique.directive.d.ts +3 -3
- package/lib/rule/url/url.directive.d.ts +3 -3
- package/lib/rule/uuid/uuid.directive.d.ts +3 -3
- package/lib/rule/video/video.directive.d.ts +3 -3
- package/lib/services/http.request.service.d.ts +11 -0
- package/lib/services/messages-builder.service.d.ts +9 -0
- package/lib/services/utils.service.d.ts +81 -0
- package/lib/services/validate-rule.service.d.ts +17 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class RequiredWithoutAll implements Validator, OnDestroy {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -19,6 +19,6 @@ export declare class RequiredWithoutAllDirective implements Validator, OnDestroy
|
|
|
19
19
|
private isValid;
|
|
20
20
|
private wireSiblingWatchers;
|
|
21
21
|
ngOnDestroy(): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RequiredWithoutAll, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RequiredWithoutAll, "[requiredWithoutAll]", never, { "requiredWithoutAll": "requiredWithoutAll"; "message": "message"; }, {}, never, never, false>;
|
|
24
24
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
3
|
+
import { ValidateRuleService } from '../services/validate-rule.service';
|
|
4
|
+
import { LocalizedMessageGroup } from '../interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class Rule implements Validator {
|
|
7
|
+
private ruleValidate;
|
|
8
|
+
private el;
|
|
9
|
+
private vmessage;
|
|
10
|
+
private fieldName;
|
|
11
|
+
rule: string | string[];
|
|
12
|
+
set message(data: LocalizedMessageGroup);
|
|
13
|
+
constructor(ruleValidate: ValidateRuleService, el: ElementRef);
|
|
14
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Rule, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Rule, "[Rule], [rule]", never, { "rule": "Rule"; "message": "message"; }, {}, never, never, false>;
|
|
17
|
+
}
|
|
@@ -60,6 +60,6 @@ import * as i58 from "./alpha_dash/alpha-dash.directive";
|
|
|
60
60
|
import * as i59 from "@angular/common";
|
|
61
61
|
export declare class RuleModule {
|
|
62
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<RuleModule, never>;
|
|
63
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RuleModule, [typeof i1.
|
|
63
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RuleModule, [typeof i1.Rule, typeof i2.Required, typeof i3.Above, typeof i4.Accepted, typeof i5.After, typeof i6.Alpha, typeof i7.AlphaNumeric, typeof i8.Array, typeof i9.Url, typeof i10.Date, typeof i11.Before, typeof i12.Boolean, typeof i13.Confirmed, typeof i14.DateFormat, typeof i15.Different, typeof i16.Email, typeof i17.In, typeof i18.Equals, typeof i19.EndsWith, typeof i20.Includes, typeof i21.Ipv4, typeof i22.Same, typeof i23.Ip, typeof i24.Ipv6, typeof i25.Json, typeof i26.Max, typeof i27.Min, typeof i28.NotEquals, typeof i29.NotIn, typeof i30.StartsWith, typeof i31.Range, typeof i32.Between, typeof i33.Regex, typeof i34.Integer, typeof i35.Number, typeof i36.String, typeof i37.Under, typeof i38.NotRegex, typeof i39.Uuid, typeof i40.Unique, typeof i41.CreditCard, typeof i42.DebitCard, typeof i43.Cvv, typeof i44.Strength, typeof i45.PhoneNo, typeof i46.RequiredIf, typeof i47.RequiredUnless, typeof i48.RequiredWith, typeof i49.RequiredWithAll, typeof i50.RequiredWithout, typeof i51.RequiredWithoutAll, typeof i52.Mimes, typeof i53.Size, typeof i54.Dimension, typeof i55.Image, typeof i56.Video, typeof i57.Exists, typeof i58.AlphaDash], [typeof i59.CommonModule], [typeof i1.Rule, typeof i2.Required, typeof i3.Above, typeof i4.Accepted, typeof i5.After, typeof i6.Alpha, typeof i7.AlphaNumeric, typeof i8.Array, typeof i9.Url, typeof i10.Date, typeof i11.Before, typeof i12.Boolean, typeof i13.Confirmed, typeof i14.DateFormat, typeof i15.Different, typeof i16.Email, typeof i17.In, typeof i18.Equals, typeof i19.EndsWith, typeof i20.Includes, typeof i21.Ipv4, typeof i22.Same, typeof i23.Ip, typeof i24.Ipv6, typeof i25.Json, typeof i26.Max, typeof i27.Min, typeof i28.NotEquals, typeof i29.NotIn, typeof i30.StartsWith, typeof i31.Range, typeof i32.Between, typeof i33.Regex, typeof i34.Integer, typeof i35.Number, typeof i36.String, typeof i37.Under, typeof i38.NotRegex, typeof i39.Uuid, typeof i40.Unique, typeof i41.CreditCard, typeof i42.DebitCard, typeof i43.Cvv, typeof i44.Strength, typeof i45.PhoneNo, typeof i46.RequiredIf, typeof i47.RequiredUnless, typeof i48.RequiredWith, typeof i49.RequiredWithAll, typeof i50.RequiredWithout, typeof i51.RequiredWithoutAll, typeof i52.Mimes, typeof i53.Size, typeof i54.Dimension, typeof i55.Image, typeof i56.Video, typeof i57.Exists, typeof i58.AlphaDash]>;
|
|
64
64
|
static ɵinj: i0.ɵɵInjectorDeclaration<RuleModule>;
|
|
65
65
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class Same implements Validator, OnDestroy {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -19,6 +19,6 @@ export declare class SameDirective implements Validator, OnDestroy {
|
|
|
19
19
|
private isValid;
|
|
20
20
|
private wireSiblingWatchers;
|
|
21
21
|
ngOnDestroy(): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Same, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Same, "[same]", never, { "same": "same"; "message": "message"; }, {}, never, never, false>;
|
|
24
24
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class Size implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -15,6 +15,6 @@ export declare class SizeDirective implements Validator {
|
|
|
15
15
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
16
16
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
17
17
|
private isValid;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Size, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Size, "[size]", never, { "size": "size"; "message": "message"; }, {}, never, never, false>;
|
|
20
20
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class StartsWith implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -15,6 +15,6 @@ export declare class StartsWithDirective implements Validator {
|
|
|
15
15
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
16
16
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
17
17
|
private isValid;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StartsWith, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<StartsWith, "[startsWith]", never, { "startsWith": "startsWith"; "message": "message"; }, {}, never, never, false>;
|
|
20
20
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class Strength implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -15,6 +15,6 @@ export declare class StrengthDirective implements Validator {
|
|
|
15
15
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
16
16
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
17
17
|
private isValid;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Strength, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Strength, "[strength]", never, { "strength": "strength"; "message": "message"; }, {}, never, never, false>;
|
|
20
20
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class String implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -14,6 +14,6 @@ export declare class StringDirective implements Validator {
|
|
|
14
14
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
15
15
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
16
16
|
private isValid;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<String, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<String, "[string]", never, { "message": "message"; }, {}, never, never, false>;
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class Under implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -15,6 +15,6 @@ export declare class UnderDirective implements Validator {
|
|
|
15
15
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
16
16
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
17
17
|
private isValid;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Under, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Under, "[under]", never, { "under": "under"; "message": "message"; }, {}, never, never, false>;
|
|
20
20
|
}
|
|
@@ -5,7 +5,7 @@ import { Observable } from 'rxjs';
|
|
|
5
5
|
import { HttpRequestArgs, LocalizedMessage } from '../../interface';
|
|
6
6
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class Unique implements AsyncValidator {
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
11
11
|
private mb;
|
|
@@ -16,6 +16,6 @@ export declare class UniqueDirective implements AsyncValidator {
|
|
|
16
16
|
constructor(el: ElementRef, utl: UtilService, mb: MessageBuilderService);
|
|
17
17
|
validate(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
|
18
18
|
private isValid;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
20
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Unique, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Unique, "[unique]", never, { "unique": "unique"; "message": "message"; }, {}, never, never, false>;
|
|
21
21
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class Url implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -14,6 +14,6 @@ export declare class UrlDirective implements Validator {
|
|
|
14
14
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
15
15
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
16
16
|
private isValid;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Url, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Url, "[url]", never, { "message": "message"; }, {}, never, never, false>;
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class Uuid implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -14,6 +14,6 @@ export declare class UuidDirective implements Validator {
|
|
|
14
14
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
15
15
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
16
16
|
private isValid;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Uuid, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Uuid, "[uuid]", never, { "message": "message"; }, {}, never, never, false>;
|
|
19
19
|
}
|
|
@@ -4,7 +4,7 @@ import { UtilService } from '../../services/utils.service';
|
|
|
4
4
|
import { MessageBuilderService } from '../../services/messages-builder.service';
|
|
5
5
|
import { LocalizedMessage } from '../../interface';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class Video implements Validator {
|
|
8
8
|
private mb;
|
|
9
9
|
private el;
|
|
10
10
|
private utl;
|
|
@@ -14,6 +14,6 @@ export declare class VideoDirective implements Validator {
|
|
|
14
14
|
constructor(mb: MessageBuilderService, el: ElementRef, utl: UtilService);
|
|
15
15
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
16
16
|
private isValid;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Video, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Video, "[video]", never, { "message": "message"; }, {}, never, never, false>;
|
|
19
19
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class HttpRequestService {
|
|
5
|
+
protected http: HttpClient;
|
|
6
|
+
constructor(http: HttpClient);
|
|
7
|
+
get(action_url: string, params?: {}): Observable<any>;
|
|
8
|
+
post(action_url: string, data?: any, params?: {}): Observable<any>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRequestService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HttpRequestService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MessageBuilderService {
|
|
4
|
+
private ts;
|
|
5
|
+
constructor(ts: TranslateService);
|
|
6
|
+
call(langAttr: string, attribute: string, ...args: any): string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBuilderService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MessageBuilderService>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { HttpRequestService } from './http.request.service';
|
|
2
|
+
import { NgAbsoluteValidatorService } from './../ng-absolute-validator.service';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { AbstractControl2, HttpRequestArgs } from '../interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class UtilService {
|
|
7
|
+
private http;
|
|
8
|
+
private abs;
|
|
9
|
+
defaultTimeZone: string;
|
|
10
|
+
creditCardIssuers: any;
|
|
11
|
+
debitCardIssuers: any;
|
|
12
|
+
customObjectName: any;
|
|
13
|
+
customRulesName: any;
|
|
14
|
+
stringStrength: any;
|
|
15
|
+
constructor(http: HttpRequestService, abs: NgAbsoluteValidatorService);
|
|
16
|
+
init(): void;
|
|
17
|
+
setValidationRules(control: AbstractControl2, rules: string | string[], appends?: {}): void;
|
|
18
|
+
json(string: string): boolean;
|
|
19
|
+
confirmed(control: AbstractControl2, args: string, fieldName?: null): boolean | void;
|
|
20
|
+
same(control: AbstractControl2, args: string): boolean;
|
|
21
|
+
different(control: AbstractControl2, args: string): boolean;
|
|
22
|
+
required(actualData: string): boolean;
|
|
23
|
+
requiredIf(control: AbstractControl2, args: string | string[]): boolean;
|
|
24
|
+
requiredUnless(control: AbstractControl2, args: string | string[]): boolean;
|
|
25
|
+
requiredWith(control: AbstractControl2, args: string | string[]): boolean;
|
|
26
|
+
requiredWithAll(control: AbstractControl2, args: string | string[]): boolean;
|
|
27
|
+
requiredWithout(control: AbstractControl2, args: string | string[]): boolean;
|
|
28
|
+
requiredWithoutAll(control: AbstractControl2, args: string | string[]): boolean;
|
|
29
|
+
email(actualData: string): boolean;
|
|
30
|
+
above(actualData: number, toBeData: number): boolean;
|
|
31
|
+
accepted(actualData: any): boolean;
|
|
32
|
+
date(actualData: string, format?: string): boolean;
|
|
33
|
+
dateFormat(actualData: any, format?: string): boolean;
|
|
34
|
+
after(actualData: string, toBeData: string | string[]): boolean;
|
|
35
|
+
before(actualData: string, toBeData: string | string[]): boolean;
|
|
36
|
+
alpha(actualData: string): boolean;
|
|
37
|
+
alphaNumeric(actualData: string): boolean;
|
|
38
|
+
alphaDash(actualData: string): boolean;
|
|
39
|
+
array(actualData: string): boolean;
|
|
40
|
+
boolean(actualData: string): boolean;
|
|
41
|
+
equals(actualData: string, compared_to_value: string): boolean;
|
|
42
|
+
endsWith(actualData: string, end_with: any): boolean;
|
|
43
|
+
startsWith(actualData: string, start_with: string | string[]): boolean;
|
|
44
|
+
in(actualData: string, compare: string | string[]): boolean;
|
|
45
|
+
notIn(actualData: string, compare: string | string[]): boolean;
|
|
46
|
+
includes(actualData: string, compare: string | string[]): boolean;
|
|
47
|
+
number(actualData: any): boolean;
|
|
48
|
+
string(actualData: any): boolean;
|
|
49
|
+
integer(actualData: any): boolean;
|
|
50
|
+
ip(actualData: string): boolean;
|
|
51
|
+
ipv4(actualData: string): boolean;
|
|
52
|
+
ipv6(actualData: string): boolean;
|
|
53
|
+
max(actualData: any, max: number): boolean;
|
|
54
|
+
min(actualData: any, min: string | number): boolean;
|
|
55
|
+
notEquals(actualData: any, compare_to: any): boolean;
|
|
56
|
+
range(actualData: string, range: string | string[] | number[]): boolean;
|
|
57
|
+
between(actualData: string, range: string | string[] | number[]): boolean;
|
|
58
|
+
under(actualData: string, under: string): boolean;
|
|
59
|
+
url(actualData: string): boolean;
|
|
60
|
+
regex(actualData: string, expression: string): boolean;
|
|
61
|
+
notRegex(actualData: string, expression: string): boolean;
|
|
62
|
+
uuid(actualData: string): boolean;
|
|
63
|
+
unique(args: HttpRequestArgs): Observable<boolean>;
|
|
64
|
+
exists(args: HttpRequestArgs): Observable<boolean>;
|
|
65
|
+
getCreditCardData(number: string): any;
|
|
66
|
+
creditCard(actualData: string): boolean;
|
|
67
|
+
private getDebitCardData;
|
|
68
|
+
debitCard(actualData: number): boolean;
|
|
69
|
+
cvv(actualData: string): boolean;
|
|
70
|
+
getStrengthData(actualData: string, compare: string | string[]): any;
|
|
71
|
+
strength(actualData: string, compare: string | string[]): boolean;
|
|
72
|
+
phoneNo(actualData: string, expression?: string | null): boolean;
|
|
73
|
+
image(fileInstance: File[]): boolean;
|
|
74
|
+
video(fileInstance: File[]): boolean;
|
|
75
|
+
mimes(fileInstance: File[], compare: string | string[]): boolean;
|
|
76
|
+
size(fileInstance: File[], compare: number): boolean;
|
|
77
|
+
dimension(fileInstance: File[], compare: string | string[]): Observable<any>;
|
|
78
|
+
private doComparison;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UtilService, never>;
|
|
80
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UtilService>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UtilService } from './utils.service';
|
|
2
|
+
import { MessageBuilderService } from './messages-builder.service';
|
|
3
|
+
import { ValidationErrors } from '@angular/forms';
|
|
4
|
+
import { AbstractControl2, LocalizedMessageGroup } from '../interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ValidateRuleService {
|
|
7
|
+
private mb;
|
|
8
|
+
private utl;
|
|
9
|
+
private subMessageMethod;
|
|
10
|
+
private wiredRulesMap;
|
|
11
|
+
constructor(mb: MessageBuilderService, utl: UtilService);
|
|
12
|
+
gererateRuleAndValidate(fieldName: string, control: AbstractControl2, rule: string | string[], custom_message: LocalizedMessageGroup): ValidationErrors | null;
|
|
13
|
+
private getMessageKeyRespectToValue;
|
|
14
|
+
private wireSiblingWatchers;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidateRuleService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ValidateRuleService>;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbcore/ng-absolute-validator",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A complete Angular form validation library — built-in, custom, and advanced/async validators for reactive and template-driven forms.",
|
|
6
6
|
"author": {
|