Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@skyux/validation

Package Overview
Dependencies
Maintainers
1
Versions
399
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 5.5.0 to 5.6.0

24

documentation.json

@@ -496,3 +496,3 @@ {

"fileName": "projects/validation/src/modules/email-validation/email-validation.directive.ts",
"line": 41,
"line": 40,
"character": 9

@@ -539,3 +539,3 @@ }

"fileName": "projects/validation/src/modules/email-validation/email-validation.directive.ts",
"line": 25,
"line": 24,
"character": 9

@@ -631,3 +631,3 @@ }

"fileName": "projects/validation/src/modules/email-validation/email-validation.directive.ts",
"line": 24,
"line": 23,
"character": 13

@@ -701,3 +701,3 @@ }

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

@@ -744,3 +744,3 @@ }

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

@@ -836,3 +836,3 @@ }

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

@@ -882,3 +882,3 @@ }

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

@@ -888,3 +888,3 @@ {

"filePath": "/projects/validation/documentation/code-examples/email-validation/control-validator/email-validation-demo.module.ts",
"rawContents": "import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyEmailValidationModule } from '@skyux/validation';\n\nimport { EmailValidationDemoComponent } from './email-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyEmailValidationModule,\n SkyIdModule,\n SkyInputBoxModule,\n ],\n exports: [EmailValidationDemoComponent],\n declarations: [EmailValidationDemoComponent],\n})\nexport class EmailValidationDemoModule {}\n"
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyEmailValidationModule } from '@skyux/validation';\n\nimport { EmailValidationDemoComponent } from './email-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyEmailValidationModule,\n SkyIdModule,\n SkyInputBoxModule,\n ],\n exports: [EmailValidationDemoComponent],\n declarations: [EmailValidationDemoComponent],\n})\nexport class EmailValidationDemoModule {}\n"
},

@@ -904,3 +904,3 @@ {

"filePath": "/projects/validation/documentation/code-examples/email-validation/directive/email-validation-demo.module.ts",
"rawContents": "import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { FormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyEmailValidationModule } from '@skyux/validation';\n\nimport { EmailValidationDemoComponent } from './email-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n SkyEmailValidationModule,\n SkyIdModule,\n SkyInputBoxModule,\n ],\n exports: [EmailValidationDemoComponent],\n declarations: [EmailValidationDemoComponent],\n})\nexport class EmailValidationDemoModule {}\n"
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyEmailValidationModule } from '@skyux/validation';\n\nimport { EmailValidationDemoComponent } from './email-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n SkyEmailValidationModule,\n SkyIdModule,\n SkyInputBoxModule,\n ],\n exports: [EmailValidationDemoComponent],\n declarations: [EmailValidationDemoComponent],\n})\nexport class EmailValidationDemoModule {}\n"
},

@@ -915,3 +915,3 @@ {

"filePath": "/projects/validation/documentation/code-examples/url-validation/control-validator/url-validation-demo.component.ts",
"rawContents": "import { Component, OnInit } from '@angular/core';\n\nimport {\n AbstractControl,\n FormBuilder,\n FormControl,\n FormGroup,\n Validators,\n} from '@angular/forms';\n\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, [Validators.required, SkyValidators.url]),\n });\n }\n}\n"
},

@@ -921,3 +921,3 @@ {

"filePath": "/projects/validation/documentation/code-examples/url-validation/control-validator/url-validation-demo.module.ts",
"rawContents": "import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyUrlValidationModule } from '@skyux/validation';\n\nimport { UrlValidationDemoComponent } from './url-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyUrlValidationModule,\n ],\n exports: [UrlValidationDemoComponent],\n declarations: [UrlValidationDemoComponent],\n})\nexport class UrlValidationDemoModule {}\n"
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyUrlValidationModule } from '@skyux/validation';\n\nimport { UrlValidationDemoComponent } from './url-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyUrlValidationModule,\n ],\n exports: [UrlValidationDemoComponent],\n declarations: [UrlValidationDemoComponent],\n})\nexport class UrlValidationDemoModule {}\n"
},

@@ -937,5 +937,5 @@ {

"filePath": "/projects/validation/documentation/code-examples/url-validation/directive/url-validation-demo.module.ts",
"rawContents": "import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { FormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyUrlValidationModule } from '@skyux/validation';\n\nimport { UrlValidationDemoComponent } from './url-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyUrlValidationModule,\n ],\n exports: [UrlValidationDemoComponent],\n declarations: [UrlValidationDemoComponent],\n})\nexport class UrlValidationDemoModule {}\n"
"rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyUrlValidationModule } from '@skyux/validation';\n\nimport { UrlValidationDemoComponent } from './url-validation-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n SkyIdModule,\n SkyInputBoxModule,\n SkyUrlValidationModule,\n ],\n exports: [UrlValidationDemoComponent],\n declarations: [UrlValidationDemoComponent],\n})\nexport class UrlValidationDemoModule {}\n"
}
]
}

@@ -19,3 +19,3 @@ import { Directive, forwardRef } from '@angular/core';

validate(control) {
let value = control.value;
const value = control.value;
if (!value) {

@@ -22,0 +22,0 @@ return;

@@ -6,7 +6,7 @@ export class SkyValidation {

// tslint:disable-next-line:max-line-length
let regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return regex.test(emailAddress);
}
static isUrl(url) {
let regex = /^((http|https):\/\/)?([\w\-]+\.)+[\w\-]+/i;
const regex = /^((http|https):\/\/)?([\w\-]+\.)+[\w\-]+/i;
return regex.test(url);

@@ -13,0 +13,0 @@ }

@@ -10,7 +10,7 @@ import * as i0 from '@angular/core';

// tslint:disable-next-line:max-line-length
let regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return regex.test(emailAddress);
}
static isUrl(url) {
let regex = /^((http|https):\/\/)?([\w\-]+\.)+[\w\-]+/i;
const regex = /^((http|https):\/\/)?([\w\-]+\.)+[\w\-]+/i;
return regex.test(url);

@@ -34,3 +34,3 @@ }

validate(control) {
let value = control.value;
const value = control.value;
if (!value) {

@@ -37,0 +37,0 @@ return;

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

import { Validator, AbstractControl } from '@angular/forms';
import { AbstractControl, Validator } from '@angular/forms';
import * as i0 from "@angular/core";

@@ -3,0 +3,0 @@ /**

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

import { Validator, AbstractControl } from '@angular/forms';
import { AbstractControl, Validator } from '@angular/forms';
import * as i0 from "@angular/core";

@@ -3,0 +3,0 @@ /**

{
"name": "@skyux/validation",
"version": "5.5.0",
"version": "5.6.0",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^12.2.16",

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