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

ng2-validation

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-validation - npm Package Compare versions

Comparing version 3.2.4 to 3.3.0

14

dist/custom-validators.js

@@ -100,4 +100,5 @@ "use strict";

CustomValidators.minDate = function (minDate) {
if (!lang_1.isDate(minDate))
throw Error('minDate value must be a formatted date');
if (!lang_1.isDate(minDate) && !(minDate instanceof Function)) {
throw Error('minDate value must be or return a formatted date');
}
return function (control) {

@@ -109,2 +110,4 @@ if (lang_1.isPresent(forms_1.Validators.required(control)))

return { minDate: true };
if (minDate instanceof Function)
minDate = minDate();
return d >= new Date(minDate) ? null : { minDate: true };

@@ -117,4 +120,5 @@ };

CustomValidators.maxDate = function (maxDate) {
if (!lang_1.isDate(maxDate))
throw Error('maxDate value must be a formatted date');
if (!lang_1.isDate(maxDate) && !(maxDate instanceof Function)) {
throw Error('maxDate value must be or return a formatted date');
}
return function (control) {

@@ -126,2 +130,4 @@ if (lang_1.isPresent(forms_1.Validators.required(control)))

return { maxDate: true };
if (maxDate instanceof Function)
maxDate = maxDate();
return d <= new Date(maxDate) ? null : { maxDate: true };

@@ -128,0 +134,0 @@ };

{
"name": "ng2-validation",
"version": "3.2.4",
"version": "3.3.0",
"description": "angular2 validation",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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