Socket
Socket
Sign inDemoInstall

@skyux/validation

Package Overview
Dependencies
Maintainers
1
Versions
376
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@skyux/validation - npm Package Compare versions

Comparing version 6.0.2 to 6.1.0

esm2020/lib/modules/url-validation/url-validation-options.mjs

363

documentation.json

@@ -8,3 +8,4 @@ {

"SkyEmailValidationDirective": "class-skyemailvalidationdirective",
"SkyUrlValidationDirective": "class-skyurlvalidationdirective"
"SkyUrlValidationDirective": "class-skyurlvalidationdirective",
"SkyUrlValidationOptions": "interface-skyurlvalidationoptions"
},

@@ -20,3 +21,3 @@ "typedoc": {

{
"id": 25,
"id": 30,
"name": "SkyEmailValidationModule",

@@ -46,3 +47,3 @@ "kind": 128,

"children": [
26
31
]

@@ -60,3 +61,3 @@ }

{
"id": 28,
"id": 35,
"name": "SkyUrlValidationModule",

@@ -86,3 +87,3 @@ "kind": 128,

"children": [
29
36
]

@@ -100,3 +101,3 @@ }

{
"id": 31,
"id": 38,
"name": "SkyValidation",

@@ -110,3 +111,3 @@ "kind": 128,

{
"id": 32,
"id": 39,
"name": "isEmail",

@@ -122,3 +123,3 @@ "kind": 2048,

"fileName": "projects/validation/src/modules/validation/validation.ts",
"line": 2,
"line": 6,
"character": 16

@@ -129,3 +130,3 @@ }

{
"id": 33,
"id": 40,
"name": "isEmail",

@@ -137,3 +138,3 @@ "kind": 4096,

{
"id": 34,
"id": 41,
"name": "emailAddress",

@@ -157,3 +158,3 @@ "kind": 32768,

{
"id": 35,
"id": 42,
"name": "isUrl",

@@ -169,3 +170,3 @@ "kind": 2048,

"fileName": "projects/validation/src/modules/validation/validation.ts",
"line": 10,
"line": 14,
"character": 16

@@ -176,3 +177,3 @@ }

{
"id": 36,
"id": 43,
"name": "isUrl",

@@ -184,4 +185,4 @@ "kind": 4096,

{
"id": 37,
"name": "url",
"id": 44,
"name": "value",
"kind": 32768,

@@ -192,4 +193,18 @@ "kindString": "Parameter",

"type": "intrinsic",
"name": "string"
"name": "unknown"
}
},
{
"id": 45,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"type": {
"type": "reference",
"id": 33,
"name": "SkyUrlValidationOptions"
}
}

@@ -210,3 +225,3 @@ ],

"children": [
38
46
]

@@ -218,4 +233,4 @@ },

"children": [
32,
35
39,
42
]

@@ -227,3 +242,3 @@ }

"fileName": "projects/validation/src/modules/validation/validation.ts",
"line": 1,
"line": 5,
"character": 22

@@ -234,3 +249,3 @@ }

{
"id": 40,
"id": 48,
"name": "SkyValidators",

@@ -242,3 +257,3 @@ "kind": 128,

{
"id": 41,
"id": 49,
"name": "email",

@@ -260,3 +275,3 @@ "kind": 2048,

{
"id": 42,
"id": 50,
"name": "email",

@@ -267,7 +282,7 @@ "kind": 4096,

"comment": {
"shortText": "Validates email addresses in reactive forms. Add this validator directly to the form control\nmodel in the component class. If users enter values that are not valid email addresses, the\nvalidator throws an error. Since this is a sync validator, it returns a set of validation\nerrors or `undefined` immediately when users enter values."
"shortText": "Validates email addresses in reactive forms. Add this validator directly to the form control\nmodel in the component class. If users enter values that are not valid email addresses, the\nvalidator throws an error. Since this is a sync validator, it returns a set of validation\nerrors or `null` immediately when users enter values."
},
"parameters": [
{
"id": 43,
"id": 51,
"name": "control",

@@ -277,5 +292,2 @@ "kind": 32768,

"flags": {},
"comment": {
"shortText": "\n"
},
"type": {

@@ -299,3 +311,3 @@ "type": "reference",

{
"id": 44,
"id": 52,
"name": "url",

@@ -311,3 +323,3 @@ "kind": 2048,

"fileName": "projects/validation/src/modules/validators/validators.ts",
"line": 35,
"line": 34,
"character": 16

@@ -318,3 +330,3 @@ }

{
"id": 45,
"id": 53,
"name": "url",

@@ -325,14 +337,11 @@ "kind": 4096,

"comment": {
"shortText": "Validates URLs in reactive forms. Add this validator directly to the form control model in\nthe component class. If users enter values that are not valid URLs, the validator throws an\nerror. Since this is a sync validator, it returns a set of validation errors or `undefined`\nimmediately when users enter values."
"shortText": "Validates URLs in reactive forms. Add this validator directly to the form control model in\nthe component class. If users enter values that are not valid URLs, the validator throws an\nerror. Since this is a sync validator, it returns a set of validation errors or `null`\nimmediately when users enter values."
},
"parameters": [
{
"id": 46,
"name": "control",
"id": 54,
"name": "abstractControl",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"comment": {
"shortText": "\n"
},
"type": {

@@ -352,2 +361,32 @@ "type": "reference",

}
},
{
"id": 55,
"name": "url",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"comment": {
"shortText": "Validates URLs in reactive forms. Add this validator with ruleset parameters directly to\nthe form control model in the component class. If users enter values that are not valid\nURLs, the validator throws an error. Since this is a sync validator, it returns a set of\nvalidation errors or `null` immediately when users enter values."
},
"parameters": [
{
"id": 56,
"name": "skyUrlValidationOptions",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"id": 33,
"name": "SkyUrlValidationOptions"
}
}
],
"type": {
"type": "reference",
"qualifiedName": "ValidatorFn",
"package": "@angular/forms",
"name": "ValidatorFn"
}
}

@@ -362,3 +401,3 @@ ]

"children": [
47
57
]

@@ -370,4 +409,4 @@ },

"children": [
41,
44
49,
52
]

@@ -379,3 +418,3 @@ }

"fileName": "projects/validation/src/modules/validators/validators.ts",
"line": 8,
"line": 9,
"character": 13

@@ -591,4 +630,62 @@ }

{
"id": 22,
"name": "urlIsValid",
"id": 16,
"name": "skyUrlValidation",
"kind": 262144,
"kindString": "Accessor",
"flags": {
"isPublic": true
},
"decorators": [
{
"name": "Input",
"type": {
"type": "reference",
"qualifiedName": "InputDecorator",
"package": "@angular/core",
"name": "Input"
},
"arguments": {}
}
],
"sources": [
{
"fileName": "projects/validation/src/modules/url-validation/url-validation.directive.ts",
"line": 34,
"character": 13
}
],
"setSignature": [
{
"id": 17,
"name": "skyUrlValidation",
"kind": 1048576,
"kindString": "Set signature",
"flags": {},
"comment": {
"shortText": "Specifies configuration options for the URL validation component."
},
"parameters": [
{
"id": 18,
"name": "value",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"id": 33,
"name": "SkyUrlValidationOptions"
}
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
]
},
{
"id": 25,
"name": "registerOnValidatorChange",
"kind": 2048,

@@ -602,3 +699,3 @@ "kindString": "Method",

"fileName": "projects/validation/src/modules/url-validation/url-validation.directive.ts",
"line": 38,
"line": 56,
"character": 9

@@ -609,4 +706,4 @@ }

{
"id": 23,
"name": "urlIsValid",
"id": 26,
"name": "registerOnValidatorChange",
"kind": 4096,

@@ -617,4 +714,4 @@ "kindString": "Call signature",

{
"id": 24,
"name": "url",
"id": 27,
"name": "fn",
"kind": 32768,

@@ -624,4 +721,23 @@ "kindString": "Parameter",

"type": {
"type": "intrinsic",
"name": "string"
"type": "reflection",
"declaration": {
"id": 28,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"signatures": [
{
"id": 29,
"name": "__type",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"type": {
"type": "intrinsic",
"name": "void"
}
}
]
}
}

@@ -632,9 +748,17 @@ }

"type": "intrinsic",
"name": "boolean"
"name": "void"
},
"implementationOf": {
"type": "reference",
"name": "Validator.registerOnValidatorChange"
}
}
]
],
"implementationOf": {
"type": "reference",
"name": "Validator.registerOnValidatorChange"
}
},
{
"id": 16,
"id": 22,
"name": "validate",

@@ -649,3 +773,3 @@ "kind": 2048,

"fileName": "projects/validation/src/modules/url-validation/url-validation.directive.ts",
"line": 22,
"line": 44,
"character": 9

@@ -656,3 +780,3 @@ }

{
"id": 17,
"id": 23,
"name": "validate",

@@ -664,3 +788,3 @@ "kind": 4096,

{
"id": 18,
"id": 24,
"name": "control",

@@ -679,33 +803,6 @@ "kind": 32768,

"type": {
"type": "reflection",
"declaration": {
"id": 19,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"indexSignature": {
"id": 20,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 21,
"name": "key",
"kind": 32768,
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "any"
}
}
}
"type": "reference",
"qualifiedName": "ValidationErrors",
"package": "@angular/forms",
"name": "ValidationErrors"
},

@@ -733,7 +830,14 @@ "implementationOf": {

{
"title": "Accessors",
"kind": 262144,
"children": [
16
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
22,
16
25,
22
]

@@ -745,3 +849,3 @@ }

"fileName": "projects/validation/src/modules/url-validation/url-validation.directive.ts",
"line": 21,
"line": 29,
"character": 13

@@ -758,2 +862,60 @@ }

]
},
{
"id": 33,
"name": "SkyUrlValidationOptions",
"kind": 256,
"kindString": "Interface",
"flags": {},
"comment": {
"shortText": "Specifies options for the URL validator component."
},
"children": [
{
"id": 34,
"name": "rulesetVersion",
"kind": 1024,
"kindString": "Property",
"flags": {},
"comment": {
"shortText": "Indicates the ruleset to use for URL validation. Ruleset 1 uses a regular expression and ruleset 2 uses the third-party [validator.js library](https://github.com/validatorjs/validator.js/)."
},
"sources": [
{
"fileName": "projects/validation/src/modules/url-validation/url-validation-options.ts",
"line": 8,
"character": 2
}
],
"type": {
"type": "union",
"types": [
{
"type": "literal",
"value": 1
},
{
"type": "literal",
"value": 2
}
]
}
}
],
"groups": [
{
"title": "Properties",
"kind": 1024,
"children": [
34
]
}
],
"sources": [
{
"fileName": "projects/validation/src/modules/url-validation/url-validation-options.ts",
"line": 4,
"character": 17
}
]
}

@@ -766,9 +928,16 @@ ],

"children": [
25,
28,
31,
40,
30,
35,
38,
48,
1,
13
]
},
{
"title": "Interfaces",
"kind": 256,
"children": [
33
]
}

@@ -823,3 +992,3 @@ ],

"filePath": "/projects/validation/documentation/code-examples/url-validation/control-validator/url-validation-demo.component.ts",
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport {\n AbstractControl,\n FormBuilder,\n FormControl,\n FormGroup,\n Validators,\n} from '@angular/forms';\nimport { SkyValidators } from '@skyux/validation';\n\n@Component({\n selector: 'app-url-validation-demo',\n templateUrl: './url-validation-demo.component.html',\n})\nexport class UrlValidationDemoComponent implements OnInit {\n public get urlControl(): AbstractControl {\n return this.formGroup.get('url');\n }\n\n public formGroup: FormGroup;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.formGroup = this.formBuilder.group({\n url: new FormControl(undefined, [Validators.required, SkyValidators.url]),\n });\n }\n}\n"
"rawContents": "import { Component, OnInit } from '@angular/core';\nimport {\n AbstractControl,\n FormBuilder,\n FormControl,\n FormGroup,\n Validators,\n} from '@angular/forms';\nimport { SkyValidators } from '@skyux/validation';\n\n@Component({\n selector: 'app-url-validation-demo',\n templateUrl: './url-validation-demo.component.html',\n})\nexport class UrlValidationDemoComponent implements OnInit {\n public get urlControl(): AbstractControl {\n return this.formGroup.get('url');\n }\n\n public formGroup: FormGroup;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.formGroup = this.formBuilder.group({\n url: new FormControl(undefined, [\n Validators.required,\n SkyValidators.url({\n rulesetVersion: 2,\n }),\n ]),\n });\n }\n}\n"
},

@@ -834,3 +1003,3 @@ {

"filePath": "/projects/validation/documentation/code-examples/url-validation/directive/url-validation-demo.component.html",
"rawContents": "<form novalidate>\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"urlInput.id\"> Url </label>\n <input\n class=\"sky-form-control\"\n name=\"url\"\n skyUrlValidation\n skyId\n [(ngModel)]=\"demoModel.url\"\n #urlInput=\"skyId\"\n #urlControl=\"ngModel\"\n />\n </sky-input-box>\n </div>\n\n <div\n *ngIf=\"urlControl.errors?.skyUrl && urlControl.dirty && urlControl.touched\"\n class=\"sky-error-label\"\n >\n Enter a valid URL in the \"http(s)://site.domain\" format.\n </div>\n</form>\n"
"rawContents": "<form novalidate>\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"urlInput.id\"> URL </label>\n <input\n class=\"sky-form-control\"\n name=\"url\"\n [skyUrlValidation]=\"skyUrlValidationOptions\"\n skyId\n [(ngModel)]=\"demoModel.url\"\n #urlInput=\"skyId\"\n #urlControl=\"ngModel\"\n />\n </sky-input-box>\n </div>\n\n <div\n *ngIf=\"urlControl.errors?.skyUrl && urlControl.dirty && urlControl.touched\"\n class=\"sky-error-label\"\n >\n Enter a valid URL in the \"http(s)://site.domain\" format.\n </div>\n</form>\n"
},

@@ -840,3 +1009,3 @@ {

"filePath": "/projects/validation/documentation/code-examples/url-validation/directive/url-validation-demo.component.ts",
"rawContents": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-url-validation-demo',\n templateUrl: './url-validation-demo.component.html',\n})\nexport class UrlValidationDemoComponent {\n public demoModel: {\n url?: string;\n } = {};\n}\n"
"rawContents": "import { Component } from '@angular/core';\nimport { SkyUrlValidationOptions } from '@skyux/validation';\n\n@Component({\n selector: 'app-url-validation-demo',\n templateUrl: './url-validation-demo.component.html',\n})\nexport class UrlValidationDemoComponent {\n public demoModel: {\n url?: string;\n } = {};\n\n public skyUrlValidationOptions: SkyUrlValidationOptions = {\n rulesetVersion: 2,\n };\n}\n"
},

@@ -843,0 +1012,0 @@ {

export * from './lib/modules/email-validation/email-validation.module';
export * from './lib/modules/url-validation/url-validation-options';
export * from './lib/modules/url-validation/url-validation.module';

@@ -3,0 +4,0 @@ export * from './lib/modules/validation/validation';

@@ -1,2 +0,3 @@

import { AbstractControl, Validator } from '@angular/forms';
import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
import { SkyUrlValidationOptions } from './url-validation-options';
import * as i0 from "@angular/core";

@@ -9,8 +10,12 @@ /**

export declare class SkyUrlValidationDirective implements Validator {
validate(control: AbstractControl): {
[key: string]: any;
};
urlIsValid(url: string): boolean;
/**
* Specifies configuration options for the URL validation component.
*/
set skyUrlValidation(value: SkyUrlValidationOptions | undefined);
private _skyUrlValidationOptions;
private _validatorChange;
validate(control: AbstractControl): ValidationErrors | null;
registerOnValidatorChange(fn: () => void): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SkyUrlValidationDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyUrlValidationDirective, "[skyUrlValidation]", never, {}, {}, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SkyUrlValidationDirective, "[skyUrlValidation]", never, { "skyUrlValidation": "skyUrlValidation"; }, {}, never>;
}

@@ -0,4 +1,5 @@

import { SkyUrlValidationOptions } from '../url-validation/url-validation-options';
export declare abstract class SkyValidation {
static isEmail(emailAddress: string): boolean;
static isUrl(url: string): boolean;
static isUrl(value: unknown, options?: SkyUrlValidationOptions): boolean;
}

@@ -1,2 +0,3 @@

import { AbstractControl, ValidationErrors } from '@angular/forms';
import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
import { SkyUrlValidationOptions } from '../url-validation/url-validation-options';
export declare class SkyValidators {

@@ -7,4 +8,3 @@ /**

* validator throws an error. Since this is a sync validator, it returns a set of validation
* errors or `undefined` immediately when users enter values.
* @param control
* errors or `null` immediately when users enter values.
*/

@@ -15,7 +15,13 @@ static email(control: AbstractControl): ValidationErrors | null;

* the component class. If users enter values that are not valid URLs, the validator throws an
* error. Since this is a sync validator, it returns a set of validation errors or `undefined`
* error. Since this is a sync validator, it returns a set of validation errors or `null`
* immediately when users enter values.
* @param control
*/
static url(control: AbstractControl): ValidationErrors | null;
static url(abstractControl: AbstractControl): ValidationErrors | null;
/**
* Validates URLs in reactive forms. Add this validator with ruleset parameters directly to
* the form control model in the component class. If users enter values that are not valid
* URLs, the validator throws an error. Since this is a sync validator, it returns a set of
* validation errors or `null` immediately when users enter values.
*/
static url(skyUrlValidationOptions: SkyUrlValidationOptions): ValidatorFn | null;
}
{
"name": "@skyux/validation",
"version": "6.0.2",
"version": "6.1.0",
"author": "Blackbaud, Inc.",

@@ -40,3 +40,4 @@ "keywords": [

"dependencies": {
"tslib": "^2.3.1"
"tslib": "^2.3.1",
"validator": "13.7.0"
},

@@ -43,0 +44,0 @@ "module": "fesm2015/skyux-validation.mjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc