From e6f6176176a5cbe9d20b605026c07b9f821b12d4 Mon Sep 17 00:00:00 2001
From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Date: Wed, 7 Jun 2023 12:06:04 -0700
Subject: [PATCH 001/128] Update branding to 6.0.19 (#48643)
---
eng/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 9ac58198d9fe..696641326f1f 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,7 +8,7 @@
6
0
- 18
+ 19
false
-
+
-
@@ -25,10 +24,8 @@
-
-
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 1fe89a302f9c..51b12799c580 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -217,9 +217,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -245,33 +245,33 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ e37fab9fc9f7bce120a7165491ed392a73f8ab51
diff --git a/eng/Versions.props b/eng/Versions.props
index 696641326f1f..0b563149f06a 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18-servicing.23269.7
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19-servicing.23318.6
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.18-servicing.23269.7
+ 6.0.19-servicing.23318.6
6.0.1
6.0.0
6.0.2
@@ -113,7 +113,7 @@
6.0.1
6.0.0
6.0.0
- 6.0.3
+ 6.0.4
6.0.1
6.0.1
6.0.0
From ba56573e405cf55fe95aef74b9e326b62eee6d9f Mon Sep 17 00:00:00 2001
From: Matt Mitchell
Date: Sun, 18 Jun 2023 21:13:21 -0700
Subject: [PATCH 003/128] Update dependencies from efcore 182030
---
NuGet.config | 1 +
eng/Version.Details.xml | 32 ++++++++++++++++----------------
eng/Versions.props | 16 ++++++++--------
3 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 12f646f578ed..6d58f765e839 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,6 +7,7 @@
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 51b12799c580..25c58daba8da 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6482592dff6a30de0d36a2555b6b3e774ed253d2
+ 6c0296b50a5af5aa6483b0b3ba89819fb0550c63
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index 0b563149f06a..f50da5c08057 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.10
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18
- 6.0.18
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19
+ 6.0.19
6.0.0-beta.23211.7
6.0.0-beta.23211.7
From cd9340856ed85215a911c97c44d52373f6cba2f9 Mon Sep 17 00:00:00 2001
From: Matt Mitchell
Date: Sun, 18 Jun 2023 22:39:02 -0700
Subject: [PATCH 004/128] Skip helix tests
---
.azure/pipelines/ci.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index 2c28c29324c2..e4c0c86eae6c 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -1,4 +1,4 @@
-#
+ #
# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file.
#
@@ -788,6 +788,7 @@ stages:
# Helix x64
- template: jobs/default-build.yml
parameters:
+ condition: ne(variables['SkipTests'], 'true')
jobName: Helix_x64
jobDisplayName: 'Tests: Helix x64'
agentOs: Windows
From d530c7e55d7bf542fae5457be45e929ee530ff12 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Thu, 6 Jul 2023 08:45:31 +0000
Subject: [PATCH 005/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore dnceng/internal/dotnet-runtime
---
NuGet.config | 8 +++---
eng/Version.Details.xml | 62 ++++++++++++++++++++---------------------
eng/Versions.props | 30 ++++++++++----------
3 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 5fe2b4af9609..bed55ad23787 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,10 @@
-
+
-
+
@@ -25,10 +25,10 @@
-
+
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index e05d62f7680e..c7b164140a1f 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 16d152f81ed675c2705aa38b8d6d4027b6525602
+ 06531f7f252f34b2e6c48e3179454d36864a416d
https://github.com/dotnet/runtime
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -245,40 +245,40 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a08d9ce2caf02455c0b825bcdc32974bdf769a80
+ db1112f52a8581622202f02951e195e57421fc0f
https://github.com/dotnet/arcade
diff --git a/eng/Versions.props b/eng/Versions.props
index 9dc73dcfe989..999cc24d5443 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20-servicing.23320.17
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21-servicing.23355.12
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.20-servicing.23320.17
+ 6.0.21-servicing.23355.12
6.0.1
6.0.0
6.0.2
@@ -122,14 +122,14 @@
6.0.11
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20
- 6.0.20
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21
+ 6.0.21
6.0.0-beta.23313.5
6.0.0-beta.23313.5
From e49d53e68b2ea8dd5e38b88fda2be587b540cace Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Thu, 6 Jul 2023 19:52:46 +0000
Subject: [PATCH 006/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index bed55ad23787..eb22c5afdc17 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index c7b164140a1f..52a5f4eb7e05 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -11,35 +11,35 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 06531f7f252f34b2e6c48e3179454d36864a416d
+ 54d936f07e28cfd2edda5a53de8e70739f6e9675
https://github.com/dotnet/runtime
From 79a2b3a29442351143c4a514450a317faf1411f0 Mon Sep 17 00:00:00 2001
From: Brennan Conroy
Date: Thu, 6 Jul 2023 20:12:44 +0000
Subject: [PATCH 007/128] Merged PR 31898: Avoid Redis pattern matching
Avoid Redis pattern matching
---
.../src/Internal/RedisChannels.cs | 3 +
.../src/RedisHubLifetimeManager.cs | 20 +++---
.../StackExchangeRedis/test/RedisEndToEnd.cs | 67 +++++++++++++++++++
.../test/RedisHubLifetimeManagerTests.cs | 20 ++++++
.../test/TestConnectionMultiplexer.cs | 27 ++++++++
5 files changed, 127 insertions(+), 10 deletions(-)
diff --git a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs
index 6f973ea87ec9..2c783329b230 100644
--- a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs
+++ b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisChannels.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
+using StackExchange.Redis;
namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal
{
@@ -71,5 +72,7 @@ public string Ack(string serverName)
{
return _prefix + ":internal:ack:" + serverName;
}
+
+ public static RedisChannel GetChannel(string channelName) => new RedisChannel(channelName, RedisChannel.PatternMode.Literal);
}
}
diff --git a/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs b/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs
index ee9fa0e209fc..8007eb34f3f6 100644
--- a/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs
+++ b/src/SignalR/server/StackExchangeRedis/src/RedisHubLifetimeManager.cs
@@ -114,7 +114,7 @@ public override Task OnDisconnectedAsync(HubConnectionContext connection)
var connectionChannel = _channels.Connection(connection.ConnectionId);
RedisLog.Unsubscribe(_logger, connectionChannel);
- tasks.Add(_bus!.UnsubscribeAsync(connectionChannel));
+ tasks.Add(_bus!.UnsubscribeAsync(RedisChannels.GetChannel(connectionChannel)));
var feature = connection.Features.Get()!;
var groupNames = feature.Groups;
@@ -315,7 +315,7 @@ private async Task PublishAsync(string channel, byte[] payload)
{
await EnsureRedisServerConnection();
RedisLog.PublishToChannel(_logger, channel);
- await _bus!.PublishAsync(channel, payload);
+ await _bus!.PublishAsync(RedisChannels.GetChannel(channel), payload);
}
private Task AddGroupAsyncCore(HubConnectionContext connection, string groupName)
@@ -347,7 +347,7 @@ private async Task RemoveGroupAsyncCore(HubConnectionContext connection, string
await _groups.RemoveSubscriptionAsync(groupChannel, connection, channelName =>
{
RedisLog.Unsubscribe(_logger, channelName);
- return _bus!.UnsubscribeAsync(channelName);
+ return _bus!.UnsubscribeAsync(RedisChannels.GetChannel(channelName));
});
var feature = connection.Features.Get()!;
@@ -379,7 +379,7 @@ private Task RemoveUserAsync(HubConnectionContext connection)
return _users.RemoveSubscriptionAsync(userChannel, connection, channelName =>
{
RedisLog.Unsubscribe(_logger, channelName);
- return _bus!.UnsubscribeAsync(channelName);
+ return _bus!.UnsubscribeAsync(RedisChannels.GetChannel(channelName));
});
}
@@ -396,7 +396,7 @@ public void Dispose()
private async Task SubscribeToAll()
{
RedisLog.Subscribing(_logger, _channels.All);
- var channel = await _bus!.SubscribeAsync(_channels.All);
+ var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(_channels.All));
channel.OnMessage(async channelMessage =>
{
try
@@ -426,7 +426,7 @@ private async Task SubscribeToAll()
private async Task SubscribeToGroupManagementChannel()
{
- var channel = await _bus!.SubscribeAsync(_channels.GroupManagement);
+ var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(_channels.GroupManagement));
channel.OnMessage(async channelMessage =>
{
try
@@ -463,7 +463,7 @@ private async Task SubscribeToGroupManagementChannel()
private async Task SubscribeToAckChannel()
{
// Create server specific channel in order to send an ack to a single server
- var channel = await _bus!.SubscribeAsync(_channels.Ack(_serverName));
+ var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(_channels.Ack(_serverName)));
channel.OnMessage(channelMessage =>
{
var ackId = _protocol.ReadAck((byte[])channelMessage.Message);
@@ -477,7 +477,7 @@ private async Task SubscribeToConnection(HubConnectionContext connection)
var connectionChannel = _channels.Connection(connection.ConnectionId);
RedisLog.Subscribing(_logger, connectionChannel);
- var channel = await _bus!.SubscribeAsync(connectionChannel);
+ var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(connectionChannel));
channel.OnMessage(channelMessage =>
{
var invocation = _protocol.ReadInvocation((byte[])channelMessage.Message);
@@ -492,7 +492,7 @@ private Task SubscribeToUser(HubConnectionContext connection)
return _users.AddSubscriptionAsync(userChannel, connection, async (channelName, subscriptions) =>
{
RedisLog.Subscribing(_logger, channelName);
- var channel = await _bus!.SubscribeAsync(channelName);
+ var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(channelName));
channel.OnMessage(async channelMessage =>
{
try
@@ -518,7 +518,7 @@ private Task SubscribeToUser(HubConnectionContext connection)
private async Task SubscribeToGroupAsync(string groupChannel, HubConnectionStore groupConnections)
{
RedisLog.Subscribing(_logger, groupChannel);
- var channel = await _bus!.SubscribeAsync(groupChannel);
+ var channel = await _bus!.SubscribeAsync(RedisChannels.GetChannel(groupChannel));
channel.OnMessage(async (channelMessage) =>
{
try
diff --git a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs
index 2915168d27c8..c8a71ef2321d 100644
--- a/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs
+++ b/src/SignalR/server/StackExchangeRedis/test/RedisEndToEnd.cs
@@ -149,6 +149,73 @@ public async Task CanSendAndReceiveUserMessagesWhenOneConnectionWithUserDisconne
}
}
+ [ConditionalTheory]
+ [SkipIfDockerNotPresent]
+ [MemberData(nameof(TransportTypesAndProtocolTypes))]
+ public async Task HubConnectionCanSendAndReceiveGroupMessagesGroupNameWithPatternIsTreatedAsLiteral(HttpTransportType transportType, string protocolName)
+ {
+ using (StartVerifiableLog())
+ {
+ var protocol = HubProtocolHelpers.GetHubProtocol(protocolName);
+
+ var connection = CreateConnection(_serverFixture.FirstServer.Url + "/echo", transportType, protocol, LoggerFactory);
+ var secondConnection = CreateConnection(_serverFixture.SecondServer.Url + "/echo", transportType, protocol, LoggerFactory);
+
+ var tcs = new TaskCompletionSource();
+ connection.On("Echo", message => tcs.TrySetResult(message));
+ var tcs2 = new TaskCompletionSource();
+ secondConnection.On("Echo", message => tcs2.TrySetResult(message));
+
+ var groupName = $"TestGroup_{transportType}_{protocolName}_{Guid.NewGuid()}";
+
+ await secondConnection.StartAsync().DefaultTimeout();
+ await connection.StartAsync().DefaultTimeout();
+ await connection.InvokeAsync("AddSelfToGroup", "*").DefaultTimeout();
+ await secondConnection.InvokeAsync("AddSelfToGroup", groupName).DefaultTimeout();
+ await connection.InvokeAsync("EchoGroup", groupName, "Hello, World!").DefaultTimeout();
+
+ Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout());
+ Assert.False(tcs.Task.IsCompleted);
+
+ await connection.InvokeAsync("EchoGroup", "*", "Hello, World!").DefaultTimeout();
+ Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout());
+
+ await connection.DisposeAsync().DefaultTimeout();
+ }
+ }
+
+ [ConditionalTheory]
+ [SkipIfDockerNotPresent]
+ [MemberData(nameof(TransportTypesAndProtocolTypes))]
+ public async Task CanSendAndReceiveUserMessagesUserNameWithPatternIsTreatedAsLiteral(HttpTransportType transportType, string protocolName)
+ {
+ using (StartVerifiableLog())
+ {
+ var protocol = HubProtocolHelpers.GetHubProtocol(protocolName);
+
+ var connection = CreateConnection(_serverFixture.FirstServer.Url + "/echo", transportType, protocol, LoggerFactory, userName: "*");
+ var secondConnection = CreateConnection(_serverFixture.SecondServer.Url + "/echo", transportType, protocol, LoggerFactory, userName: "userA");
+
+ var tcs = new TaskCompletionSource();
+ connection.On("Echo", message => tcs.TrySetResult(message));
+ var tcs2 = new TaskCompletionSource();
+ secondConnection.On("Echo", message => tcs2.TrySetResult(message));
+
+ await secondConnection.StartAsync().DefaultTimeout();
+ await connection.StartAsync().DefaultTimeout();
+ await connection.InvokeAsync("EchoUser", "userA", "Hello, World!").DefaultTimeout();
+
+ Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout());
+ Assert.False(tcs.Task.IsCompleted);
+
+ await connection.InvokeAsync("EchoUser", "*", "Hello, World!").DefaultTimeout();
+ Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout());
+
+ await connection.DisposeAsync().DefaultTimeout();
+ await secondConnection.DisposeAsync().DefaultTimeout();
+ }
+ }
+
private static HubConnection CreateConnection(string url, HttpTransportType transportType, IHubProtocol protocol, ILoggerFactory loggerFactory, string userName = null)
{
var hubConnectionBuilder = new HubConnectionBuilder()
diff --git a/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs b/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs
index 7d9a86ee8c0b..5a399426b7e7 100644
--- a/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs
+++ b/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs
@@ -83,6 +83,26 @@ public async Task CamelCasedJsonIsPreservedAcrossRedisBoundary()
}
}
+ // Smoke test that Debug.Asserts in TestSubscriber aren't hit
+ [Fact]
+ public async Task PatternGroupAndUser()
+ {
+ var server = new TestRedisServer();
+ using (var client = new TestClient())
+ {
+ var manager = CreateLifetimeManager(server);
+
+ var connection = HubConnectionContextUtils.Create(client.Connection);
+ connection.UserIdentifier = "*";
+
+ await manager.OnConnectedAsync(connection).DefaultTimeout();
+
+ var groupName = "*";
+
+ await manager.AddToGroupAsync(connection.ConnectionId, groupName).DefaultTimeout();
+ }
+ }
+
public override TestRedisServer CreateBackplane()
{
return new TestRedisServer();
diff --git a/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs b/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs
index e68ace5982c2..0e21b56a52b5 100644
--- a/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs
+++ b/src/SignalR/server/StackExchangeRedis/test/TestConnectionMultiplexer.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Net;
using System.Reflection;
@@ -11,6 +12,7 @@
using System.Threading.Tasks;
using StackExchange.Redis;
using StackExchange.Redis.Profiling;
+using Xunit;
namespace Microsoft.AspNetCore.SignalR.Tests
{
@@ -230,6 +232,8 @@ public class TestRedisServer
public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None)
{
+ AssertRedisChannel(channel);
+
if (_subscriptions.TryGetValue(channel, out var handlers))
{
foreach (var (_, handler) in handlers)
@@ -243,6 +247,8 @@ public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags
public void Subscribe(ChannelMessageQueue messageQueue, int subscriberId, CommandFlags flags = CommandFlags.None)
{
+ AssertRedisChannel(messageQueue.Channel);
+
Action handler = (channel, value) =>
{
// Workaround for https://github.com/StackExchange/StackExchange.Redis/issues/969
@@ -260,11 +266,20 @@ public void Subscribe(ChannelMessageQueue messageQueue, int subscriberId, Comman
public void Unsubscribe(RedisChannel channel, int subscriberId, CommandFlags flags = CommandFlags.None)
{
+ AssertRedisChannel(channel);
+
if (_subscriptions.TryGetValue(channel, out var list))
{
list.RemoveAll((item) => item.Item1 == subscriberId);
}
}
+
+ internal static void AssertRedisChannel(RedisChannel channel)
+ {
+ var patternField = typeof(RedisChannel).GetField("IsPatternBased", BindingFlags.NonPublic | BindingFlags.Instance);
+ Assert.NotNull(patternField);
+ Assert.False((bool)patternField.GetValue(channel));
+ }
}
public class TestSubscriber : ISubscriber
@@ -310,11 +325,15 @@ public Task PingAsync(CommandFlags flags = CommandFlags.None)
public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None)
{
+ TestRedisServer.AssertRedisChannel(channel);
+
return _server.Publish(channel, message, flags);
}
public async Task PublishAsync(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None)
{
+ TestRedisServer.AssertRedisChannel(channel);
+
await Task.Yield();
return Publish(channel, message, flags);
}
@@ -326,6 +345,8 @@ public void Subscribe(RedisChannel channel, Action han
public Task SubscribeAsync(RedisChannel channel, Action handler, CommandFlags flags = CommandFlags.None)
{
+ TestRedisServer.AssertRedisChannel(channel);
+
Subscribe(channel, handler, flags);
return Task.CompletedTask;
}
@@ -342,6 +363,8 @@ public bool TryWait(Task task)
public void Unsubscribe(RedisChannel channel, Action handler = null, CommandFlags flags = CommandFlags.None)
{
+ TestRedisServer.AssertRedisChannel(channel);
+
_server.Unsubscribe(channel, _id, flags);
}
@@ -357,6 +380,8 @@ public Task UnsubscribeAllAsync(CommandFlags flags = CommandFlags.None)
public Task UnsubscribeAsync(RedisChannel channel, Action handler = null, CommandFlags flags = CommandFlags.None)
{
+ TestRedisServer.AssertRedisChannel(channel);
+
Unsubscribe(channel, handler, flags);
return Task.CompletedTask;
}
@@ -391,6 +416,8 @@ public ChannelMessageQueue Subscribe(RedisChannel channel, CommandFlags flags =
public Task SubscribeAsync(RedisChannel channel, CommandFlags flags = CommandFlags.None)
{
+ TestRedisServer.AssertRedisChannel(channel);
+
var t = Subscribe(channel, flags);
return Task.FromResult(t);
}
From 311a4f964c4fc6d9a674e5befcbce30e50bb5e6c Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Tue, 11 Jul 2023 03:44:04 +0000
Subject: [PATCH 008/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 20 ++++++++++----------
eng/Versions.props | 4 ++--
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index eb22c5afdc17..ef73f074be4e 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 52a5f4eb7e05..646ddb1307c6 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- db1112f52a8581622202f02951e195e57421fc0f
+ 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
https://github.com/dotnet/arcade
diff --git a/eng/Versions.props b/eng/Versions.props
index 999cc24d5443..f6560c1b5fa3 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.21
6.0.21
6.0.21
- 6.0.21-servicing.23355.12
+ 6.0.21-servicing.23360.16
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.21-servicing.23355.12
+ 6.0.21-servicing.23360.16
6.0.1
6.0.0
6.0.2
From b7bd64b3744869ecdd1760d40d1f6872494a603d Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 12 Jul 2023 00:34:36 +0000
Subject: [PATCH 009/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index ef73f074be4e..898e661d5e9a 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 646ddb1307c6..22d4d311255e 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -11,35 +11,35 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 54d936f07e28cfd2edda5a53de8e70739f6e9675
+ 0d690b8b75b98568908726c87525c6cd4aa00362
https://github.com/dotnet/runtime
From 8c5ae080d423a9d4238f47c57955ee4233bb719c Mon Sep 17 00:00:00 2001
From: Matt Mitchell
Date: Wed, 12 Jul 2023 22:47:22 +0000
Subject: [PATCH 010/128] Merged PR 32558: [internal/release/6.0] Merge from
public
Merge from public release/6.0 to internal/release/6.0 and resolve conflicts if necessary
---
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 4 ++--
global.json | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 22d4d311255e..9a53a0a9992f 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -280,22 +280,22 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
-
+
https://github.com/dotnet/arcade
- 91616785a1a6578c83f7e93d98c34a1eb83d6223
+ cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
-
+
https://github.com/dotnet/arcade
- 91616785a1a6578c83f7e93d98c34a1eb83d6223
+ cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
-
+
https://github.com/dotnet/arcade
- 91616785a1a6578c83f7e93d98c34a1eb83d6223
+ cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
-
+
https://github.com/dotnet/arcade
- 91616785a1a6578c83f7e93d98c34a1eb83d6223
+ cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
diff --git a/eng/Versions.props b/eng/Versions.props
index dcb2136b98c9..1bdf24c11527 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -131,8 +131,8 @@
6.0.21
6.0.21
- 6.0.0-beta.23313.5
- 6.0.0-beta.23313.5
+ 6.0.0-beta.23361.3
+ 6.0.0-beta.23361.3
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 9a53a0a9992f..c7674040cf9d 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -11,35 +11,35 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 0d690b8b75b98568908726c87525c6cd4aa00362
+ fa741b8bad8eebb503bba99e078538f97aff3f5d
https://github.com/dotnet/runtime
From a62c85f2091a3e36e15eb9fb36e0c6806c29c95f Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Fri, 14 Jul 2023 02:14:58 +0000
Subject: [PATCH 012/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index c466d1bd5df3..65bb92f0d5be 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index c7674040cf9d..8cf765e85742 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
+ e40b3abf1b41621d4298642a5fd300ebf7cccf6d
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
+ e40b3abf1b41621d4298642a5fd300ebf7cccf6d
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
+ e40b3abf1b41621d4298642a5fd300ebf7cccf6d
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
+ e40b3abf1b41621d4298642a5fd300ebf7cccf6d
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
+ e40b3abf1b41621d4298642a5fd300ebf7cccf6d
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
+ e40b3abf1b41621d4298642a5fd300ebf7cccf6d
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
+ e40b3abf1b41621d4298642a5fd300ebf7cccf6d
diff --git a/eng/Versions.props b/eng/Versions.props
index 1bdf24c11527..9a77756a55fe 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.21
6.0.21
6.0.21
- 6.0.21-servicing.23360.16
+ 6.0.21-servicing.23363.11
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.21-servicing.23360.16
+ 6.0.21-servicing.23363.11
6.0.1
6.0.0
6.0.2
From cec88a329584349fda070f4c7346b10538210ace Mon Sep 17 00:00:00 2001
From: Andrew Casey
Date: Sat, 15 Jul 2023 02:24:48 +0000
Subject: [PATCH 013/128] Merged PR 32094: [6.0] Forcibly close socket on abort
Forcibly close socket when connection is aborted.
---
.../Common.FunctionalTests/ShutdownTests.cs | 7 +
.../Core/src/Internal/Http/Http1Connection.cs | 9 +-
.../src/Internal/Http/Http1MessageBody.cs | 2 +-
.../src/Internal/Http2/Http2Connection.cs | 3 +-
.../Kestrel/Core/src/KestrelServerOptions.cs | 11 +
.../src/Internal/ILibuvTrace.cs | 2 +
.../src/Internal/LibuvConnection.cs | 60 +++-
.../src/Internal/LibuvConnectionListener.cs | 26 +-
.../src/Internal/LibuvTrace.cs | 3 +
.../src/Internal/ListenerContext.cs | 2 +-
.../src/Internal/ListenerPrimary.cs | 28 +-
.../src/LibuvTransportOptions.cs | 11 +
.../test/ListenerPrimaryTests.cs | 182 +++++++++++-
.../src/Internal/ISocketsTrace.cs | 1 +
.../src/Internal/SocketConnection.cs | 18 +-
.../src/Internal/SocketsTrace.cs | 11 +
.../src/SocketConnectionContextFactory.cs | 3 +-
.../src/SocketConnectionFactoryOptions.cs | 4 +
.../src/SocketTransportOptions.cs | 11 +
.../shared/test/StreamBackedTestConnection.cs | 2 +-
.../test/TransportTestHelpers/TestServer.cs | 7 +-
.../FunctionalTests/Http2/ShutdownTests.cs | 53 ++++
.../test/FunctionalTests/RequestTests.cs | 266 ++++++++++++++++--
.../test/FunctionalTests/ResponseTests.cs | 180 +++++++++---
24 files changed, 811 insertions(+), 91 deletions(-)
diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs
index 07d723e4da87..ea0bb16a0432 100644
--- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs
+++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/ShutdownTests.cs
@@ -486,8 +486,15 @@ public async Task ClosesConnectionOnServerAbortOutOfProcess()
var response = await deploymentResult.HttpClient.GetAsync("/Abort").TimeoutAfter(TimeoutExtensions.DefaultTimeoutValue);
Assert.Equal(HttpStatusCode.BadGateway, response.StatusCode);
+
+#if NEWSHIM_FUNCTIONALS
+ // In-proc SocketConnection isn't used and there's no abort
// 0x80072f78 ERROR_HTTP_INVALID_SERVER_RESPONSE The server returned an invalid or unrecognized response
Assert.Contains("0x80072f78", await response.Content.ReadAsStringAsync());
+#else
+ // 0x80072efe ERROR_INTERNET_CONNECTION_ABORTED The connection with the server was terminated abnormally
+ Assert.Contains("0x80072efe", await response.Content.ReadAsStringAsync());
+#endif
}
catch (HttpRequestException)
{
diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs
index ad1ffff50e52..2a5927b901e6 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1Connection.cs
@@ -93,7 +93,14 @@ protected override void OnRequestProcessingEnded()
_http1Output.Dispose();
}
- public void OnInputOrOutputCompleted()
+ void IRequestProcessor.OnInputOrOutputCompleted()
+ {
+ // Closed gracefully.
+ _http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!);
+ CancelRequestAbortedToken();
+ }
+
+ void IHttpOutputAborter.OnInputOrOutputCompleted()
{
_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient));
CancelRequestAbortedToken();
diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs b/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs
index 5a3051ae56c8..b9711909eb76 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs
@@ -207,7 +207,7 @@ protected void ThrowUnexpectedEndOfRequestContent()
// so we call OnInputOrOutputCompleted() now to prevent a race in our tests where a 400
// response is written after observing the unexpected end of request content instead of just
// closing the connection without a response as expected.
- _context.OnInputOrOutputCompleted();
+ ((IHttpOutputAborter)_context).OnInputOrOutputCompleted();
KestrelBadHttpRequestException.Throw(RequestRejectionReason.UnexpectedEndOfRequestContent);
}
diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
index b197c7fccb28..ac3e9d166d4d 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
@@ -150,7 +150,8 @@ public Http2Connection(HttpConnectionContext context)
public void OnInputOrOutputCompleted()
{
TryClose();
- _frameWriter.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient));
+ var useException = _context.ServiceContext.ServerOptions.FinOnError || _clientActiveStreamCount != 0;
+ _frameWriter.Abort(useException ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!);
}
public void Abort(ConnectionAbortedException ex)
diff --git a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs
index cf930c744cbb..f732302c251f 100644
--- a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs
+++ b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs
@@ -29,9 +29,20 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core
///
public class KestrelServerOptions
{
+ private const string FinOnErrorSwitch = "Microsoft.AspNetCore.Server.Kestrel.FinOnError";
+ private static readonly bool _finOnError;
+
+ static KestrelServerOptions()
+ {
+ AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError);
+ }
+
// internal to fast-path header decoding when RequestHeaderEncodingSelector is unchanged.
internal static readonly Func DefaultHeaderEncodingSelector = _ => null;
+ // Opt-out flag for back compat. Remove in 9.0 (or make public).
+ internal bool FinOnError { get; set; } = _finOnError;
+
private Func _requestHeaderEncodingSelector = DefaultHeaderEncodingSelector;
private Func _responseHeaderEncodingSelector = DefaultHeaderEncodingSelector;
diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs
index 60966046a3a3..260657cff99b 100644
--- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ILibuvTrace.cs
@@ -14,6 +14,8 @@ internal interface ILibuvTrace : ILogger
void ConnectionWriteFin(string connectionId, string reason);
+ void ConnectionWriteRst(string connectionId, string reason);
+
void ConnectionWrite(string connectionId, int count);
void ConnectionWriteCallback(string connectionId, int status);
diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs
index fdfc852ba243..ca163d6d2aff 100644
--- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnection.cs
@@ -6,6 +6,8 @@
using System.IO;
using System.IO.Pipelines;
using System.Net;
+using System.Net.Sockets;
+using System.Reflection.Metadata;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Connections;
@@ -28,6 +30,8 @@ internal partial class LibuvConnection : TransportConnection
private readonly IDuplexPipe _originalTransport;
private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
+ private readonly bool _finOnError;
+
private volatile ConnectionAbortedException _abortReason;
private MemoryHandle _bufferHandle;
@@ -43,9 +47,11 @@ public LibuvConnection(UvStreamHandle socket,
PipeOptions inputOptions = null,
PipeOptions outputOptions = null,
long? maxReadBufferSize = null,
- long? maxWriteBufferSize = null)
+ long? maxWriteBufferSize = null,
+ bool finOnError = false)
{
_socket = socket;
+ _finOnError = finOnError;
LocalEndPoint = localEndPoint;
RemoteEndPoint = remoteEndPoint;
@@ -124,6 +130,13 @@ private async Task StartCore()
{
inputError ??= _abortReason ?? new ConnectionAbortedException("The libuv transport's send loop completed gracefully.");
+ if (!_finOnError && _abortReason is not null)
+ {
+ // When shutdown isn't clean (note that we're using _abortReason, rather than inputError, to exclude that case),
+ // we set the DontLinger socket option to cause libuv to send a RST and release any buffered response data.
+ SetDontLingerOption(_socket);
+ }
+
// Now, complete the input so that no more reads can happen
Input.Complete(inputError);
Output.Complete(outputError);
@@ -132,8 +145,16 @@ private async Task StartCore()
// on the stream handle
Input.CancelPendingFlush();
- // Send a FIN
- Log.ConnectionWriteFin(ConnectionId, inputError.Message);
+ if (!_finOnError && _abortReason is not null)
+ {
+ // Send a RST
+ Log.ConnectionWriteRst(ConnectionId, inputError.Message);
+ }
+ else
+ {
+ // Send a FIN
+ Log.ConnectionWriteFin(ConnectionId, inputError.Message);
+ }
// We're done with the socket now
_socket.Dispose();
@@ -150,6 +171,27 @@ private async Task StartCore()
}
}
+ ///
+ /// This should be called on before it is disposed.
+ /// Both and call dispose but, rather than predict
+ /// which will do so first (which varies), we make this method idempotent and call it in both.
+ ///
+ private static void SetDontLingerOption(UvStreamHandle socket)
+ {
+ if (!socket.IsClosed && !socket.IsInvalid)
+ {
+ var libuv = socket.Libuv;
+ var pSocket = IntPtr.Zero;
+ libuv.uv_fileno(socket, ref pSocket);
+
+ // libuv doesn't expose setsockopt, so we take advantage of the fact that
+ // Socket already has a PAL
+ using var managedHandle = new SafeSocketHandle(pSocket, ownsHandle: false);
+ using var managedSocket = new Socket(managedHandle);
+ managedSocket.LingerState = new LingerOption(enable: true, seconds: 0);
+ }
+ }
+
public override void Abort(ConnectionAbortedException abortReason)
{
_abortReason = abortReason;
@@ -157,8 +199,16 @@ public override void Abort(ConnectionAbortedException abortReason)
// Cancel WriteOutputAsync loop after setting _abortReason.
Output.CancelPendingRead();
- // This cancels any pending I/O.
- Thread.Post(s => s.Dispose(), _socket);
+ Thread.Post(static (self) =>
+ {
+ if (!self._finOnError)
+ {
+ SetDontLingerOption(self._socket);
+ }
+
+ // This cancels any pending I/O.
+ self._socket.Dispose();
+ }, this);
}
public override async ValueTask DisposeAsync()
diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs
index bdfcc2e65b58..f03f8e603097 100644
--- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvConnectionListener.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Threading;
@@ -134,9 +135,24 @@ internal async Task BindAsync()
{
// TODO: Move thread management to LibuvTransportFactory
// TODO: Split endpoint management from thread management
+
+ // When `FinOnError` is false (the default), we need to be able to forcibly abort connections.
+ // On Windows, libuv 1.10.0 will call `shutdown`, preventing forcible abort, on any socket
+ // not flagged as `UV_HANDLE_SHARED_TCP_SOCKET`. The only way we've found to cause socket
+ // to be flagged as `UV_HANDLE_SHARED_TCP_SOCKET` is to share it across a named pipe (which
+ // must, itself, be flagged `ipc`), which naturally happens when a `ListenerPrimary` dispatches
+ // a connection to a `ListenerSecondary`. Therefore, in scenarios where this is required, we
+ // tell the `ListenerPrimary` to dispatch *all* connections to secondary and create an
+ // additional `ListenerSecondary` to replace the lost capacity.
+ var dispatchAllToSecondary = Libuv.IsWindows && !TransportContext.Options.FinOnError;
+
#pragma warning disable CS0618
- for (var index = 0; index < TransportOptions.ThreadCount; index++)
+ var threadCount = dispatchAllToSecondary
+ ? TransportOptions.ThreadCount + 1
+ : TransportOptions.ThreadCount;
#pragma warning restore CS0618
+
+ for (var index = 0; index < threadCount; index++)
{
Threads.Add(new LibuvThread(Libuv, TransportContext));
}
@@ -148,10 +164,10 @@ internal async Task BindAsync()
try
{
-#pragma warning disable CS0618
- if (TransportOptions.ThreadCount == 1)
-#pragma warning restore CS0618
+ if (threadCount == 1)
{
+ Debug.Assert(!dispatchAllToSecondary, "Should have taken the primary/secondary code path");
+
var listener = new Listener(TransportContext);
_listeners.Add(listener);
await listener.StartAsync(EndPoint, Threads[0]).ConfigureAwait(false);
@@ -162,7 +178,7 @@ internal async Task BindAsync()
var pipeName = (Libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n");
var pipeMessage = Guid.NewGuid().ToByteArray();
- var listenerPrimary = new ListenerPrimary(TransportContext);
+ var listenerPrimary = new ListenerPrimary(TransportContext, dispatchAllToSecondary);
_listeners.Add(listenerPrimary);
await listenerPrimary.StartAsync(pipeName, pipeMessage, EndPoint, Threads[0]).ConfigureAwait(false);
EndPoint = listenerPrimary.EndPoint;
diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs
index f4e4d64aafff..c360efc7bf93 100644
--- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/LibuvTrace.cs
@@ -27,6 +27,9 @@ public void ConnectionRead(string connectionId, int count)
[LoggerMessage(7, LogLevel.Debug, @"Connection id ""{ConnectionId}"" sending FIN because: ""{Reason}""", EventName = nameof(ConnectionWriteFin))]
public partial void ConnectionWriteFin(string connectionId, string reason);
+ [LoggerMessage(8, LogLevel.Debug, @"Connection id ""{ConnectionId}"" sending RST because: ""{Reason}""", EventName = nameof(ConnectionWriteRst))]
+ public partial void ConnectionWriteRst(string connectionId, string reason);
+
public void ConnectionWrite(string connectionId, int count)
{
// Don't log for now since this could be *too* verbose.
diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs
index 7ad346f6ea59..8ab2f5f34503 100644
--- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerContext.cs
@@ -110,7 +110,7 @@ protected internal void HandleConnection(UvStreamHandle socket)
var options = TransportContext.Options;
#pragma warning disable CS0618
- var connection = new LibuvConnection(socket, TransportContext.Log, Thread, remoteEndPoint, localEndPoint, InputOptions, OutputOptions, options.MaxReadBufferSize, options.MaxWriteBufferSize);
+ var connection = new LibuvConnection(socket, TransportContext.Log, Thread, remoteEndPoint, localEndPoint, InputOptions, OutputOptions, options.MaxReadBufferSize, options.MaxWriteBufferSize, options.FinOnError);
#pragma warning restore CS0618
connection.Start();
diff --git a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs
index 8a899c91c44e..18ae24af5adb 100644
--- a/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/src/Internal/ListenerPrimary.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.IO;
using System.Net;
using System.Runtime.InteropServices;
@@ -22,6 +23,10 @@ internal class ListenerPrimary : Listener
private readonly List _dispatchPipes = new List();
// The list of pipes we've created but may not be part of _dispatchPipes
private readonly List _createdPipes = new List();
+
+ // If true, dispatch all connections to _dispatchPipes - don't process any in the primary
+ private readonly bool _dispatchAll;
+
private int _dispatchIndex;
private string _pipeName;
private byte[] _pipeMessage;
@@ -32,8 +37,9 @@ internal class ListenerPrimary : Listener
// but it has no other functional significance
private readonly ArraySegment> _dummyMessage = new ArraySegment>(new[] { new ArraySegment(new byte[] { 1, 2, 3, 4 }) });
- public ListenerPrimary(LibuvTransportContext transportContext) : base(transportContext)
+ public ListenerPrimary(LibuvTransportContext transportContext, bool dispatchAll) : base(transportContext)
{
+ _dispatchAll = dispatchAll;
}
///
@@ -107,9 +113,27 @@ private void OnListenPipe(UvStreamHandle pipe, int status, UvException error)
protected override void DispatchConnection(UvStreamHandle socket)
{
- var index = _dispatchIndex++ % (_dispatchPipes.Count + 1);
+ var modulus = _dispatchAll ? _dispatchPipes.Count : (_dispatchPipes.Count + 1);
+ if (modulus == 0)
+ {
+ if (_createdPipes.Count == 0)
+ {
+#pragma warning disable CS0618 // Type or member is obsolete
+ Log.LogError(0, $"Connection received before listeners were initialized - see https://aka.ms/dotnet/aspnet/finonerror for possible mitigations");
+#pragma warning restore CS0618 // Type or member is obsolete
+ }
+ else
+ {
+ Log.LogError(0, "Unable to process connection since listeners failed to initialize - see https://aka.ms/dotnet/aspnet/finonerror for possible mitigations");
+ }
+
+ return;
+ }
+
+ var index = _dispatchIndex++ % modulus;
if (index == _dispatchPipes.Count)
{
+ Debug.Assert(!_dispatchAll, "Should have dispatched to a secondary listener");
base.DispatchConnection(socket);
}
else
diff --git a/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs b/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs
index 142a2f99c4ce..9e58ac1a2d7a 100644
--- a/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/src/LibuvTransportOptions.cs
@@ -12,6 +12,17 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv
[Obsolete("The libuv transport is obsolete and will be removed in a future release. See https://aka.ms/libuvtransport for details.", error: false)] // Remove after .NET 6.
public class LibuvTransportOptions
{
+ private const string FinOnErrorSwitch = "Microsoft.AspNetCore.Server.Kestrel.FinOnError";
+ private static readonly bool _finOnError;
+
+ static LibuvTransportOptions()
+ {
+ AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError);
+ }
+
+ // Opt-out flag for back compat. Remove in 7.0.
+ internal bool FinOnError { get; set; } = _finOnError;
+
///
/// The number of libuv I/O threads used to process requests.
///
diff --git a/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs b/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs
index 82d04cd1ac14..58d57451490e 100644
--- a/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs
+++ b/src/Servers/Kestrel/Transport.Libuv/test/ListenerPrimaryTests.cs
@@ -5,11 +5,14 @@
using System.IO;
using System.Linq;
using System.Net;
+using System.Net.Sockets;
+using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers;
using Microsoft.AspNetCore.Testing;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Xunit;
@@ -33,7 +36,7 @@ public async Task ConnectionsGetRoundRobinedToSecondaryListeners()
// Start primary listener
var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary);
await libuvThreadPrimary.StartAsync();
- var listenerPrimary = new ListenerPrimary(transportContextPrimary);
+ var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: false);
await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary);
var address = GetUri(listenerPrimary.EndPoint);
@@ -50,6 +53,8 @@ public async Task ConnectionsGetRoundRobinedToSecondaryListeners()
}
var listenerCount = listenerPrimary.UvPipeCount;
+ Assert.Equal(0, listenerCount);
+
// Add secondary listener
var libuvThreadSecondary = new LibuvThread(libuv, transportContextSecondary);
await libuvThreadSecondary.StartAsync();
@@ -85,6 +90,74 @@ public async Task ConnectionsGetRoundRobinedToSecondaryListeners()
await listenerPrimary.DisposeAsync();
await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5));
}
+ [Theory]
+ [InlineData(1)]
+ [InlineData(2)]
+ [InlineData(3)]
+ public async Task ConnectionsGetRoundRobinedToSecondaryListeners_DispatchAll(int secondaryCount)
+ {
+ var libuv = new LibuvFunctions();
+
+ var endpoint = new IPEndPoint(IPAddress.Loopback, 0);
+
+ var transportContextPrimary = new TestLibuvTransportContext();
+ var transportContextSecondary = new TestLibuvTransportContext();
+
+ var pipeName = (libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n");
+ var pipeMessage = Guid.NewGuid().ToByteArray();
+
+ // Start primary listener
+ var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary);
+ await libuvThreadPrimary.StartAsync();
+ var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: true);
+ await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary);
+ var address = GetUri(listenerPrimary.EndPoint);
+
+ Assert.Equal(0, listenerPrimary.UvPipeCount);
+
+ // Add secondary listeners
+ var listenerSecondaries = new ListenerSecondary[secondaryCount];
+ for (int i = 0; i < secondaryCount; i++)
+ {
+ var libuvThread = new LibuvThread(libuv, transportContextSecondary);
+ await libuvThread.StartAsync();
+ var listener = new ListenerSecondary(transportContextSecondary);
+ await listener.StartAsync(pipeName, pipeMessage, endpoint, libuvThread);
+ listenerSecondaries[i] = listener;
+ }
+
+ var maxWait = Task.Delay(TestConstants.DefaultTimeout);
+ // wait for ListenerPrimary.ReadCallback to add the secondary pipe
+ while (listenerPrimary.UvPipeCount < secondaryCount)
+ {
+ var completed = await Task.WhenAny(maxWait, Task.Delay(100));
+ if (ReferenceEquals(completed, maxWait))
+ {
+ throw new TimeoutException("Timed out waiting for secondary listener to become available");
+ }
+ }
+
+ // Check that the secondaries are visited in order and that it wraps
+ // around without hitting the primary
+ for (int i = 0; i < secondaryCount + 1; i++)
+ {
+ var expectedTask = listenerSecondaries[i % secondaryCount].AcceptAsync().AsTask();
+
+ using var socket = await HttpClientSlim.GetSocket(address);
+
+ await using var connection = await expectedTask.DefaultTimeout();
+ }
+
+ foreach (var listenerSecondary in listenerSecondaries)
+ {
+ var libuvThread = listenerSecondary.Thread;
+ await listenerSecondary.DisposeAsync();
+ await libuvThread.StopAsync(TimeSpan.FromSeconds(5));
+ }
+
+ await listenerPrimary.DisposeAsync();
+ await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5));
+ }
// https://github.com/aspnet/KestrelHttpServer/issues/1182
[Fact]
@@ -103,7 +176,7 @@ public async Task NonListenerPipeConnectionsAreLoggedAndIgnored()
// Start primary listener
var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary);
await libuvThreadPrimary.StartAsync();
- var listenerPrimary = new ListenerPrimary(transportContextPrimary);
+ var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: false);
await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary);
var address = GetUri(listenerPrimary.EndPoint);
@@ -181,7 +254,6 @@ public async Task NonListenerPipeConnectionsAreLoggedAndIgnored()
Assert.Equal(LogLevel.Debug, logMessage.LogLevel);
}
-
[Fact]
public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored()
{
@@ -199,7 +271,7 @@ public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored()
// Start primary listener
var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary);
await libuvThreadPrimary.StartAsync();
- var listenerPrimary = new ListenerPrimary(transportContextPrimary);
+ var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: false);
await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary);
var address = GetUri(listenerPrimary.EndPoint);
@@ -235,6 +307,108 @@ public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored()
Assert.Contains("Bad data", errorMessage.Exception.ToString());
}
+ [Fact]
+ public async Task PipeConnectionsWithWrongMessageAreLoggedAndIgnored_DispatchAllNoneRemaining()
+ {
+ var libuv = new LibuvFunctions();
+ var endpoint = new IPEndPoint(IPAddress.Loopback, 0);
+
+ var logger = new TestApplicationErrorLogger();
+
+ var transportContextPrimary = new TestLibuvTransportContext { Log = new LibuvTrace(logger) };
+ var transportContextSecondary = new TestLibuvTransportContext();
+
+ var pipeName = (libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n");
+ var pipeMessage = Guid.NewGuid().ToByteArray();
+
+ // Start primary listener
+ var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary);
+ await libuvThreadPrimary.StartAsync();
+ var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: true);
+ await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary);
+ var address = GetUri(listenerPrimary.EndPoint);
+
+ // Add secondary listener with wrong pipe message
+ var libuvThreadSecondary = new LibuvThread(libuv, transportContextSecondary);
+ await libuvThreadSecondary.StartAsync();
+ var listenerSecondary = new ListenerSecondary(transportContextSecondary);
+ await listenerSecondary.StartAsync(pipeName, Guid.NewGuid().ToByteArray(), endpoint, libuvThreadSecondary);
+
+ // Wait up to 10 seconds for error to be logged
+ for (var i = 0; i < 10 && logger.TotalErrorsLogged == 0; i++)
+ {
+ await Task.Delay(100);
+ }
+
+ Assert.Equal(1, logger.TotalErrorsLogged);
+
+ var badDataMessage = Assert.Single(logger.Messages.Where(m => m.LogLevel == LogLevel.Error));
+ Assert.IsType(badDataMessage.Exception);
+ Assert.Contains("Bad data", badDataMessage.Exception.ToString());
+
+ using var socket = await HttpClientSlim.GetSocket(address);
+
+ var _ = listenerPrimary.AcceptAsync();
+
+ // Wait up to 10 seconds for error to be logged
+ for (var i = 0; i < 10 && logger.TotalErrorsLogged <= 1; i++)
+ {
+ await Task.Delay(100);
+ }
+
+ var noSecondariesMessage = logger.Messages.Last(m => m.LogLevel == LogLevel.Error);
+ Assert.Null(noSecondariesMessage.Exception);
+ Assert.Contains("listeners failed to initialize", noSecondariesMessage.Message);
+
+ Assert.Null(libuvThreadPrimary.FatalError);
+
+ await listenerSecondary.DisposeAsync();
+ await libuvThreadSecondary.StopAsync(TimeSpan.FromSeconds(5));
+
+ await listenerPrimary.DisposeAsync();
+ await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5));
+ }
+
+ [Fact]
+ public async Task DispatchAllConnectionBeforeSecondaries()
+ {
+ var libuv = new LibuvFunctions();
+ var endpoint = new IPEndPoint(IPAddress.Loopback, 0);
+
+ var logger = new TestApplicationErrorLogger();
+
+ var transportContextPrimary = new TestLibuvTransportContext { Log = new LibuvTrace(logger) };
+ var transportContextSecondary = new TestLibuvTransportContext();
+
+ var pipeName = (libuv.IsWindows ? @"\\.\pipe\kestrel_" : "/tmp/kestrel_") + Guid.NewGuid().ToString("n");
+ var pipeMessage = Guid.NewGuid().ToByteArray();
+
+ // Start primary listener
+ var libuvThreadPrimary = new LibuvThread(libuv, transportContextPrimary);
+ await libuvThreadPrimary.StartAsync();
+ var listenerPrimary = new ListenerPrimary(transportContextPrimary, dispatchAll: true);
+ await listenerPrimary.StartAsync(pipeName, pipeMessage, endpoint, libuvThreadPrimary);
+ var address = GetUri(listenerPrimary.EndPoint);
+
+ using var socket = await HttpClientSlim.GetSocket(address);
+
+ var _ = listenerPrimary.AcceptAsync();
+
+ // Wait up to 10 seconds for error to be logged
+ for (var i = 0; i < 10 && logger.TotalErrorsLogged <= 1; i++)
+ {
+ await Task.Delay(100);
+ }
+
+ var noSecondariesMessage = logger.Messages.Last(m => m.LogLevel == LogLevel.Error);
+ Assert.Null(noSecondariesMessage.Exception);
+ Assert.Contains("before listeners", noSecondariesMessage.Message);
+
+ Assert.Null(libuvThreadPrimary.FatalError);
+
+ await listenerPrimary.DisposeAsync();
+ await libuvThreadPrimary.StopAsync(TimeSpan.FromSeconds(5));
+ }
private static async Task AssertRoundRobin(Uri address, ListenerPrimary listenerPrimary, ListenerSecondary listenerSecondary, ListenerContext currentListener, Task expected = null, int connections = 4)
{
diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs
index f5e5c4963786..cdd82f481e8f 100644
--- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs
+++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/ISocketsTrace.cs
@@ -11,6 +11,7 @@ internal interface ISocketsTrace : ILogger
void ConnectionReadFin(SocketConnection connection);
void ConnectionWriteFin(SocketConnection connection, string reason);
+ void ConnectionWriteRst(SocketConnection connection, string reason);
void ConnectionError(SocketConnection connection, Exception ex);
diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs
index f43c2e1454f1..c7f58a128a82 100644
--- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs
+++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs
@@ -10,6 +10,7 @@
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal
{
+
internal sealed partial class SocketConnection : TransportConnection
{
private static readonly int MinAllocBufferSize = PinnedBlockMemoryPool.BlockSize / 2;
@@ -30,6 +31,7 @@ internal sealed partial class SocketConnection : TransportConnection
private readonly TaskCompletionSource _waitForConnectionClosedTcs = new TaskCompletionSource();
private bool _connectionClosed;
private readonly bool _waitForData;
+ private readonly bool _finOnError;
internal SocketConnection(Socket socket,
MemoryPool memoryPool,
@@ -38,7 +40,8 @@ internal SocketConnection(Socket socket,
SocketSenderPool socketSenderPool,
PipeOptions inputOptions,
PipeOptions outputOptions,
- bool waitForData = true)
+ bool waitForData = true,
+ bool finOnError = false)
{
Debug.Assert(socket != null);
Debug.Assert(memoryPool != null);
@@ -49,6 +52,7 @@ internal SocketConnection(Socket socket,
_trace = trace;
_waitForData = waitForData;
_socketSenderPool = socketSenderPool;
+ _finOnError = finOnError;
LocalEndPoint = _socket.LocalEndPoint;
RemoteEndPoint = _socket.RemoteEndPoint;
@@ -329,11 +333,21 @@ private void Shutdown(Exception? shutdownReason)
// ever observe the nondescript ConnectionAbortedException except for connection middleware attempting
// to half close the connection which is currently unsupported.
_shutdownReason = shutdownReason ?? new ConnectionAbortedException("The Socket transport's send loop completed gracefully.");
+
+ // NB: not _shutdownReason since we don't want to do this on graceful completion
+ if (!_finOnError && shutdownReason is not null)
+ {
+ _trace.ConnectionWriteRst(this, shutdownReason.Message);
+
+ // This forces an abortive close with linger time 0 (and implies Dispose)
+ _socket.Close(timeout: 0);
+ return;
+ }
+
_trace.ConnectionWriteFin(this, _shutdownReason.Message);
try
{
- // Try to gracefully close the socket even for aborts to match libuv behavior.
_socket.Shutdown(SocketShutdown.Both);
}
catch
diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs
index 1a48fa189a15..f4108eae678a 100644
--- a/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs
+++ b/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketsTrace.cs
@@ -43,6 +43,17 @@ public void ConnectionWriteFin(SocketConnection connection, string reason)
}
}
+ [LoggerMessage(8, LogLevel.Debug, @"Connection id ""{ConnectionId}"" sending RST because: ""{Reason}""", EventName = "ConnectionWriteRst", SkipEnabledCheck = true)]
+ private static partial void ConnectionWriteRst(ILogger logger, string connectionId, string reason);
+
+ public void ConnectionWriteRst(SocketConnection connection, string reason)
+ {
+ if (_logger.IsEnabled(LogLevel.Debug))
+ {
+ ConnectionWriteRst(_logger, connection.ConnectionId, reason);
+ }
+ }
+
public void ConnectionWrite(SocketConnection connection, int count)
{
// Don't log for now since this could be *too* verbose.
diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs
index 71f3cdc0fc0c..2635af9792d7 100644
--- a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs
+++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs
@@ -104,7 +104,8 @@ public ConnectionContext Create(Socket socket)
setting.SocketSenderPool,
setting.InputOptions,
setting.OutputOptions,
- waitForData: _options.WaitForDataBeforeAllocatingBuffer);
+ waitForData: _options.WaitForDataBeforeAllocatingBuffer,
+ finOnError: _options.FinOnError);
connection.Start();
return connection;
diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs
index d0c88c0535f3..fec0b3bef938 100644
--- a/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs
+++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionFactoryOptions.cs
@@ -23,8 +23,12 @@ internal SocketConnectionFactoryOptions(SocketTransportOptions transportOptions)
MaxWriteBufferSize = transportOptions.MaxWriteBufferSize;
UnsafePreferInlineScheduling = transportOptions.UnsafePreferInlineScheduling;
MemoryPoolFactory = transportOptions.MemoryPoolFactory;
+ FinOnError = transportOptions.FinOnError;
}
+ // Opt-out flag for back compat. Remove in 9.0 (or make public).
+ internal bool FinOnError { get; set; }
+
///
/// The number of I/O queues used to process requests. Set to 0 to directly schedule I/O to the ThreadPool.
///
diff --git a/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs b/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs
index 9130cb980454..4f22c079dc1f 100644
--- a/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs
+++ b/src/Servers/Kestrel/Transport.Sockets/src/SocketTransportOptions.cs
@@ -13,6 +13,17 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
///
public class SocketTransportOptions
{
+ private const string FinOnErrorSwitch = "Microsoft.AspNetCore.Server.Kestrel.FinOnError";
+ private static readonly bool _finOnError;
+
+ static SocketTransportOptions()
+ {
+ AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError);
+ }
+
+ // Opt-out flag for back compat. Remove in 9.0 (or make public).
+ internal bool FinOnError { get; set; } = _finOnError;
+
///
/// The number of I/O queues used to process requests. Set to 0 to directly schedule I/O to the ThreadPool.
///
diff --git a/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs b/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs
index 5dd91c4337d9..eb4f310e7a29 100644
--- a/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs
+++ b/src/Servers/Kestrel/shared/test/StreamBackedTestConnection.cs
@@ -138,7 +138,7 @@ public async Task ReceiveEnd(params string[] lines)
public async Task WaitForConnectionClose()
{
var buffer = new byte[128];
- var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).TimeoutAfter(Timeout);
+ var bytesTransferred = await _stream.ReadAsync(buffer, 0, 128).ContinueWith(t => t.IsFaulted ? 0 : t.Result).TimeoutAfter(Timeout);
if (bytesTransferred > 0)
{
diff --git a/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs b/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs
index 79fc65849640..0c8109cb9952 100644
--- a/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs
+++ b/src/Servers/Kestrel/shared/test/TransportTestHelpers/TestServer.cs
@@ -48,7 +48,7 @@ public TestServer(RequestDelegate app, TestServiceContext context, ListenOptions
{
}
- public TestServer(RequestDelegate app, TestServiceContext context, Action configureListenOptions)
+ public TestServer(RequestDelegate app, TestServiceContext context, Action configureListenOptions, Action configureServices = null)
: this(app, context, options =>
{
var listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
@@ -57,7 +57,10 @@ public TestServer(RequestDelegate app, TestServiceContext context, Action { })
+ }, s =>
+ {
+ configureServices?.Invoke(s);
+ })
{
}
diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs
index 1a12f4629e44..ff5f06ea21a5 100644
--- a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs
+++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs
@@ -46,6 +46,59 @@ public ShutdownTests()
};
}
+ [ConditionalFact]
+ public async Task ConnectionClosedWithoutActiveRequestsOrGoAwayFIN()
+ {
+ var connectionClosed = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var readFin = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var writeFin = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+
+ TestSink.MessageLogged += context =>
+ {
+ if (context.EventId.Name == "Http2ConnectionClosed")
+ {
+ connectionClosed.SetResult();
+ }
+ else if (context.EventId.Name == "ConnectionReadFin")
+ {
+ readFin.SetResult();
+ }
+ else if (context.EventId.Name == "ConnectionWriteFin")
+ {
+ writeFin.SetResult();
+ }
+ };
+
+ var testContext = new TestServiceContext(LoggerFactory);
+
+ testContext.InitializeHeartbeat();
+
+ await using (var server = new TestServer(context =>
+ {
+ return context.Response.WriteAsync("hello world " + context.Request.Protocol);
+ },
+ testContext,
+ kestrelOptions =>
+ {
+ kestrelOptions.Listen(IPAddress.Loopback, 0, listenOptions =>
+ {
+ listenOptions.Protocols = HttpProtocols.Http2;
+ listenOptions.UseHttps(_x509Certificate2);
+ });
+ }))
+ {
+ var response = await Client.GetStringAsync($"https://localhost:{server.Port}/");
+ Assert.Equal("hello world HTTP/2", response);
+ Client.Dispose(); // Close the socket, no GoAway is sent.
+
+ await readFin.Task.DefaultTimeout();
+ await writeFin.Task.DefaultTimeout();
+ await connectionClosed.Task.DefaultTimeout();
+
+ await server.StopAsync();
+ }
+ }
+
[CollectDump]
[ConditionalFact]
public async Task GracefulShutdownWaitsForRequestsToFinish()
diff --git a/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs b/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs
index e10a5dc3ad3d..af391389ade3 100644
--- a/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs
+++ b/src/Servers/Kestrel/test/FunctionalTests/RequestTests.cs
@@ -21,7 +21,13 @@
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
using Microsoft.AspNetCore.Server.Kestrel.FunctionalTests;
+#if LIBUV
+using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv;
+#elif SOCKETS
+using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets;
+#endif
using Microsoft.AspNetCore.Testing;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Moq;
@@ -40,6 +46,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
public class RequestTests : LoggedTest
{
private const int _connectionStartedEventId = 1;
+ private const int _connectionReadFinEventId = 6;
private const int _connectionResetEventId = 19;
private static readonly int _semaphoreWaitTimeout = Debugger.IsAttached ? 10000 : 2500;
@@ -234,6 +241,59 @@ await connection2.Receive($"HTTP/1.1 200 OK",
}
}
+ [Fact]
+ public async Task ConnectionClosedPriorToRequestIsLoggedAsDebug()
+ {
+ var connectionStarted = new SemaphoreSlim(0);
+ var connectionReadFin = new SemaphoreSlim(0);
+ var loggedHigherThanDebug = false;
+
+ TestSink.MessageLogged += context =>
+ {
+ if (context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel" &&
+ context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Connections" &&
+ context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" &&
+ context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets")
+ {
+ return;
+ }
+
+ if (context.EventId.Id == _connectionStartedEventId)
+ {
+ connectionStarted.Release();
+ }
+ else if (context.EventId.Id == _connectionReadFinEventId)
+ {
+ connectionReadFin.Release();
+ }
+
+ if (context.LogLevel > LogLevel.Debug)
+ {
+ loggedHigherThanDebug = true;
+ }
+ };
+
+ await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory)))
+ {
+ using (var connection = server.CreateConnection())
+ {
+ // Wait until connection is established
+ Assert.True(await connectionStarted.WaitAsync(TestConstants.DefaultTimeout));
+
+ connection.ShutdownSend();
+
+ // If the reset is correctly logged as Debug, the wait below should complete shortly.
+ // This check MUST come before disposing the server, otherwise there's a race where the RST
+ // is still in flight when the connection is aborted, leading to the reset never being received
+ // and therefore not logged.
+ Assert.True(await connectionReadFin.WaitAsync(TestConstants.DefaultTimeout));
+ await connection.ReceiveEnd();
+ }
+ }
+
+ Assert.False(loggedHigherThanDebug);
+ }
+
[Fact]
public async Task ConnectionResetPriorToRequestIsLoggedAsDebug()
{
@@ -286,6 +346,66 @@ public async Task ConnectionResetPriorToRequestIsLoggedAsDebug()
Assert.False(loggedHigherThanDebug);
}
+ [Fact]
+ public async Task ConnectionClosedBetweenRequestsIsLoggedAsDebug()
+ {
+ var connectionReadFin = new SemaphoreSlim(0);
+ var loggedHigherThanDebug = false;
+
+ TestSink.MessageLogged += context =>
+ {
+ if (context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel" &&
+ context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" &&
+ context.LoggerName != "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets")
+ {
+ return;
+ }
+
+ if (context.LogLevel > LogLevel.Debug)
+ {
+ loggedHigherThanDebug = true;
+ }
+
+ if (context.EventId.Id == _connectionReadFinEventId)
+ {
+ connectionReadFin.Release();
+ }
+ };
+
+ await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory)))
+ {
+ using (var connection = server.CreateConnection())
+ {
+ await connection.Send(
+ "GET / HTTP/1.1",
+ "Host:",
+ "",
+ "");
+
+ // Make sure the response is fully received, so a write failure (e.g. EPIPE) doesn't cause
+ // a more critical log message.
+ await connection.Receive(
+ "HTTP/1.1 200 OK",
+ "Content-Length: 0",
+ $"Date: {server.Context.DateHeaderValue}",
+ "",
+ "");
+
+ connection.ShutdownSend();
+
+ // If the reset is correctly logged as Debug, the wait below should complete shortly.
+ // This check MUST come before disposing the server, otherwise there's a race where the RST
+ // is still in flight when the connection is aborted, leading to the reset never being received
+ // and therefore not logged.
+ Assert.True(await connectionReadFin.WaitAsync(TestConstants.DefaultTimeout));
+
+ await connection.ReceiveEnd();
+ }
+ }
+
+ Assert.False(loggedHigherThanDebug);
+ }
+
[Fact]
public async Task ConnectionResetBetweenRequestsIsLoggedAsDebug()
{
@@ -345,10 +465,13 @@ await connection.Receive(
Assert.False(loggedHigherThanDebug);
}
- [Fact]
- public async Task ConnectionResetMidRequestIsLoggedAsDebug()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task ConnectionClosedOrResetMidRequestIsLoggedAsDebug(bool close)
{
var requestStarted = new SemaphoreSlim(0);
+ var connectionReadFin = new SemaphoreSlim(0);
var connectionReset = new SemaphoreSlim(0);
var connectionClosing = new SemaphoreSlim(0);
var loggedHigherThanDebug = false;
@@ -367,6 +490,11 @@ public async Task ConnectionResetMidRequestIsLoggedAsDebug()
loggedHigherThanDebug = true;
}
+ if (context.EventId.Id == _connectionReadFinEventId)
+ {
+ connectionReadFin.Release();
+ }
+
if (context.EventId.Id == _connectionResetEventId)
{
connectionReset.Release();
@@ -387,15 +515,23 @@ public async Task ConnectionResetMidRequestIsLoggedAsDebug()
// Wait until connection is established
Assert.True(await requestStarted.WaitAsync(TestConstants.DefaultTimeout), "request should have started");
- connection.Reset();
- }
+ if (close)
+ {
+ connection.ShutdownSend();
+ Assert.True(await connectionReadFin.WaitAsync(TestConstants.DefaultTimeout), "Connection close event should have been logged");
+ }
+ else
+ {
+ connection.Reset();
- // If the reset is correctly logged as Debug, the wait below should complete shortly.
- // This check MUST come before disposing the server, otherwise there's a race where the RST
- // is still in flight when the connection is aborted, leading to the reset never being received
- // and therefore not logged.
- Assert.True(await connectionReset.WaitAsync(TestConstants.DefaultTimeout), "Connection reset event should have been logged");
- connectionClosing.Release();
+ // If the reset is correctly logged as Debug, the wait below should complete shortly.
+ // This check MUST come before disposing the server, otherwise there's a race where the RST
+ // is still in flight when the connection is aborted, leading to the reset never being received
+ // and therefore not logged.
+ Assert.True(await connectionReset.WaitAsync(TestConstants.DefaultTimeout), "Connection reset event should have been logged");
+ }
+ connectionClosing.Release();
+ }
}
Assert.False(loggedHigherThanDebug, "Logged event should not have been higher than debug.");
@@ -494,18 +630,43 @@ public async Task RequestAbortedTokenFiredOnClientFIN()
}
}
- [Fact]
- public async Task AbortingTheConnectionSendsFIN()
+ [Theory]
+#if LIBUV
+ [InlineData(true, 1)]
+ [InlineData(false, 1)]
+ [InlineData(true, 2)]
+ [InlineData(false, 2)]
+ public async Task AbortingTheConnection(bool fin, int threadCount)
+#else
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task AbortingTheConnection(bool fin)
+#endif
{
+ var connectionAborted = new SemaphoreSlim(0);
+
var builder = TransportSelector.GetHostBuilder()
+#if LIBUV
+ .ConfigureServices(services =>
+ {
+#pragma warning disable CS0618 // Type or member is obsolete
+ services.Configure(options =>
+ {
+ options.ThreadCount = threadCount;
+ });
+#pragma warning restore CS0618 // Type or member is obsolete
+ })
+#endif
.ConfigureWebHost(webHostBuilder =>
{
webHostBuilder
+ .ConfigureServices(s => SetFinOnError(s, fin))
.UseKestrel()
.UseUrls("http://127.0.0.1:0")
.Configure(app => app.Run(context =>
{
context.Abort();
+ connectionAborted.Release();
return Task.CompletedTask;
}));
})
@@ -519,8 +680,18 @@ public async Task AbortingTheConnectionSendsFIN()
{
socket.Connect(new IPEndPoint(IPAddress.Loopback, host.GetPort()));
socket.Send(Encoding.ASCII.GetBytes("GET / HTTP/1.1\r\nHost:\r\n\r\n"));
- int result = socket.Receive(new byte[32]);
- Assert.Equal(0, result);
+
+ Assert.True(await connectionAborted.WaitAsync(_semaphoreWaitTimeout));
+
+ if (fin)
+ {
+ int result = socket.Receive(new byte[32]);
+ Assert.Equal(0, result);
+ }
+ else
+ {
+ Assert.Throws(() => socket.Receive(new byte[32]));
+ }
}
await host.StopAsync();
@@ -731,16 +902,21 @@ await connection.Send("POST / HTTP/1.1",
}
[Theory]
- [MemberData(nameof(ConnectionMiddlewareDataName))]
- public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOptionsName)
+ [InlineData("Loopback", true)]
+ [InlineData("PassThrough", true)]
+ [InlineData("Loopback", false)]
+ [InlineData("PassThrough", false)]
+ public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOptionsName, bool fin)
{
const int connectionPausedEventId = 4;
const int connectionFinSentEventId = 7;
+ const int connectionRstSentEventId = 8;
const int maxRequestBufferSize = 4096;
var readCallbackUnwired = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var clientClosedConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
- var serverClosedConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var serverFinConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var serverRstConnection = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var appFuncCompleted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
TestSink.MessageLogged += context =>
@@ -757,7 +933,11 @@ public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOpti
}
else if (context.EventId == connectionFinSentEventId)
{
- serverClosedConnection.SetResult();
+ serverFinConnection.SetResult();
+ }
+ else if (context.EventId == connectionRstSentEventId)
+ {
+ serverRstConnection.SetResult();
}
};
@@ -766,6 +946,7 @@ public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOpti
{
ServerOptions =
{
+ FinOnError = fin,
Limits =
{
MaxRequestBufferSize = maxRequestBufferSize,
@@ -783,10 +964,24 @@ public async Task ServerCanAbortConnectionAfterUnobservedClose(string listenOpti
context.Abort();
- await serverClosedConnection.Task;
+ if (fin)
+ {
+ await serverFinConnection.Task.DefaultTimeout();
+ }
+ else
+ {
+ await serverRstConnection.Task.DefaultTimeout();
+ }
appFuncCompleted.SetResult();
- }, testContext, ConnectionMiddlewareData[listenOptionsName]()))
+ }, testContext, listen =>
+ {
+ if (listenOptionsName == "PassThrough")
+ {
+ listen.UsePassThrough();
+ }
+ },
+ services => SetFinOnError(services, fin)))
{
using (var connection = server.CreateConnection())
{
@@ -956,21 +1151,21 @@ await context.Response.WriteAsync(JsonConvert.SerializeObject(new
private static async Task AssertStreamContains(Stream stream, string expectedSubstring)
{
var expectedBytes = Encoding.ASCII.GetBytes(expectedSubstring);
- var exptectedLength = expectedBytes.Length;
- var responseBuffer = new byte[exptectedLength];
+ var expectedLength = expectedBytes.Length;
+ var responseBuffer = new byte[expectedLength];
var matchedChars = 0;
- while (matchedChars < exptectedLength)
+ while (matchedChars < expectedLength)
{
- var count = await stream.ReadAsync(responseBuffer, 0, exptectedLength - matchedChars).DefaultTimeout();
+ var count = await stream.ReadAsync(responseBuffer, 0, expectedLength - matchedChars).DefaultTimeout();
if (count == 0)
{
Assert.True(false, "Stream completed without expected substring.");
}
- for (var i = 0; i < count && matchedChars < exptectedLength; i++)
+ for (var i = 0; i < count && matchedChars < expectedLength; i++)
{
if (responseBuffer[i] == expectedBytes[matchedChars])
{
@@ -983,5 +1178,26 @@ private static async Task AssertStreamContains(Stream stream, string expectedSub
}
}
}
+
+ private static void SetFinOnError(IServiceCollection services, bool finOnError)
+ {
+#if LIBUV
+#pragma warning disable CS0618 // Type or member is obsolete
+ services.Configure(options =>
+ {
+ options.FinOnError = finOnError;
+ });
+#pragma warning restore CS0618 // Type or member is obsolete
+#elif SOCKETS
+ services.Configure(o =>
+ {
+ o.FinOnError = finOnError;
+ });
+#endif
+ services.Configure(o =>
+ {
+ o.FinOnError = finOnError;
+ });
+ }
}
}
diff --git a/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs b/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs
index 991044dbf8f0..cbda94bd05a6 100644
--- a/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs
+++ b/src/Servers/Kestrel/test/FunctionalTests/ResponseTests.cs
@@ -23,7 +23,13 @@
using Microsoft.AspNetCore.Server.Kestrel.Https;
using Microsoft.AspNetCore.Server.Kestrel.Https.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Tests;
+#if LIBUV
+using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv;
+#elif SOCKETS
+using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets;
+#endif
using Microsoft.AspNetCore.Testing;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Testing;
@@ -462,8 +468,10 @@ await connection.Send(
Assert.Empty(coreLogs.Where(w => w.LogLevel > LogLevel.Information));
}
- [Fact]
- public async Task ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate(bool fin)
{
var logger = LoggerFactory.CreateLogger($"{ typeof(ResponseTests).FullName}.{ nameof(ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate)}");
const int chunkSize = 1024;
@@ -473,21 +481,35 @@ public async Task ConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate()
var responseRateTimeoutMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var connectionStopMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var connectionWriteFinMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var connectionWriteRstMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var requestAborted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var appFuncCompleted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
- var mockKestrelTrace = new Mock();
- mockKestrelTrace
- .Setup(trace => trace.ResponseMinimumDataRateNotSatisfied(It.IsAny(), It.IsAny()))
- .Callback(() => responseRateTimeoutMessageLogged.SetResult());
- mockKestrelTrace
- .Setup(trace => trace.ConnectionStop(It.IsAny()))
- .Callback(() => connectionStopMessageLogged.SetResult());
+ TestSink.MessageLogged += context =>
+ {
+ switch (context.EventId.Name)
+ {
+ case "ResponseMinimumDataRateNotSatisfied":
+ responseRateTimeoutMessageLogged.SetResult();
+ break;
+ case "ConnectionStop":
+ connectionStopMessageLogged.SetResult();
+ break;
+ case "ConnectionWriteFin":
+ connectionWriteFinMessageLogged.SetResult();
+ break;
+ case "ConnectionWriteRst":
+ connectionWriteRstMessageLogged.SetResult();
+ break;
+ }
+ };
- var testContext = new TestServiceContext(LoggerFactory, mockKestrelTrace.Object)
+ var testContext = new TestServiceContext(LoggerFactory)
{
ServerOptions =
{
+ FinOnError = fin,
Limits =
{
MinResponseDataRate = new MinDataRate(bytesPerSecond: 1024 * 1024, gracePeriod: TimeSpan.FromSeconds(2))
@@ -533,7 +555,7 @@ async Task App(HttpContext context)
}
}
- await using (var server = new TestServer(App, testContext))
+ await using (var server = new TestServer(App, testContext, configureListenOptions: _ => { }, services => SetFinOnError(services, fin)))
{
using (var connection = server.CreateConnection())
{
@@ -553,8 +575,16 @@ await connection.Send(
await requestAborted.Task.DefaultTimeout(TimeSpan.FromSeconds(30));
await responseRateTimeoutMessageLogged.Task.DefaultTimeout();
await connectionStopMessageLogged.Task.DefaultTimeout();
+ if (fin)
+ {
+ await connectionWriteFinMessageLogged.Task.DefaultTimeout();
+ }
+ else
+ {
+ await connectionWriteRstMessageLogged.Task.DefaultTimeout();
+ }
await appFuncCompleted.Task.DefaultTimeout();
- await AssertStreamAborted(connection.Stream, chunkSize * chunks);
+ await AssertStreamAborted(connection.Stream, chunkSize * chunks, fin);
sw.Stop();
logger.LogInformation("Connection was aborted after {totalMilliseconds}ms.", sw.ElapsedMilliseconds);
@@ -562,8 +592,10 @@ await connection.Send(
}
}
- [Fact]
- public async Task HttpsConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task HttpsConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate(bool fin)
{
const int chunkSize = 1024;
const int chunks = 256 * 1024;
@@ -573,21 +605,35 @@ public async Task HttpsConnectionClosedWhenResponseDoesNotSatisfyMinimumDataRate
var responseRateTimeoutMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var connectionStopMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var connectionWriteFinMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var connectionWriteRstMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var aborted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var appFuncCompleted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
- var mockKestrelTrace = new Mock();
- mockKestrelTrace
- .Setup(trace => trace.ResponseMinimumDataRateNotSatisfied(It.IsAny(), It.IsAny()))
- .Callback(() => responseRateTimeoutMessageLogged.SetResult());
- mockKestrelTrace
- .Setup(trace => trace.ConnectionStop(It.IsAny()))
- .Callback(() => connectionStopMessageLogged.SetResult());
+ TestSink.MessageLogged += context =>
+ {
+ switch (context.EventId.Name)
+ {
+ case "ResponseMinimumDataRateNotSatisfied":
+ responseRateTimeoutMessageLogged.SetResult();
+ break;
+ case "ConnectionStop":
+ connectionStopMessageLogged.SetResult();
+ break;
+ case "ConnectionWriteFin":
+ connectionWriteFinMessageLogged.SetResult();
+ break;
+ case "ConnectionWriteRst":
+ connectionWriteRstMessageLogged.SetResult();
+ break;
+ }
+ };
- var testContext = new TestServiceContext(LoggerFactory, mockKestrelTrace.Object)
+ var testContext = new TestServiceContext(LoggerFactory)
{
ServerOptions =
{
+ FinOnError = fin,
Limits =
{
MinResponseDataRate = new MinDataRate(bytesPerSecond: 1024 * 1024, gracePeriod: TimeSpan.FromSeconds(2))
@@ -627,7 +673,8 @@ void ConfigureListenOptions(ListenOptions listenOptions)
{
await aborted.Task.DefaultTimeout();
}
- }, testContext, ConfigureListenOptions))
+ }, testContext, ConfigureListenOptions,
+ services => SetFinOnError(services, fin)))
{
using (var connection = server.CreateConnection())
{
@@ -642,16 +689,26 @@ void ConfigureListenOptions(ListenOptions listenOptions)
await aborted.Task.DefaultTimeout(TimeSpan.FromSeconds(30));
await responseRateTimeoutMessageLogged.Task.DefaultTimeout();
await connectionStopMessageLogged.Task.DefaultTimeout();
+ if (fin)
+ {
+ await connectionWriteFinMessageLogged.Task.DefaultTimeout();
+ }
+ else
+ {
+ await connectionWriteRstMessageLogged.Task.DefaultTimeout();
+ }
await appFuncCompleted.Task.DefaultTimeout();
- await AssertStreamAborted(connection.Stream, chunkSize * chunks);
+ await AssertStreamAborted(connection.Stream, chunkSize * chunks, fin);
}
}
}
}
- [Fact]
- public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressure()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressure(bool fin)
{
const int bufferSize = 65536;
const int bufferCount = 100;
@@ -660,21 +717,35 @@ public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressu
var responseRateTimeoutMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var connectionStopMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var connectionWriteFinMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
+ var connectionWriteRstMessageLogged = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var requestAborted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var copyToAsyncCts = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
- var mockKestrelTrace = new Mock();
- mockKestrelTrace
- .Setup(trace => trace.ResponseMinimumDataRateNotSatisfied(It.IsAny(), It.IsAny()))
- .Callback(() => responseRateTimeoutMessageLogged.SetResult());
- mockKestrelTrace
- .Setup(trace => trace.ConnectionStop(It.IsAny()))
- .Callback(() => connectionStopMessageLogged.SetResult());
+ TestSink.MessageLogged += context =>
+ {
+ switch (context.EventId.Name)
+ {
+ case "ResponseMinimumDataRateNotSatisfied":
+ responseRateTimeoutMessageLogged.SetResult();
+ break;
+ case "ConnectionStop":
+ connectionStopMessageLogged.SetResult();
+ break;
+ case "ConnectionWriteFin":
+ connectionWriteFinMessageLogged.SetResult();
+ break;
+ case "ConnectionWriteRst":
+ connectionWriteRstMessageLogged.SetResult();
+ break;
+ }
+ };
- var testContext = new TestServiceContext(LoggerFactory, mockKestrelTrace.Object)
+ var testContext = new TestServiceContext(LoggerFactory)
{
ServerOptions =
{
+ FinOnError = fin,
Limits =
{
MinResponseDataRate = new MinDataRate(bytesPerSecond: 1024 * 1024, gracePeriod: TimeSpan.FromSeconds(2)),
@@ -685,8 +756,6 @@ public async Task ConnectionClosedWhenBothRequestAndResponseExperienceBackPressu
testContext.InitializeHeartbeat();
- var listenOptions = new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0));
-
async Task App(HttpContext context)
{
context.RequestAborted.Register(() =>
@@ -711,7 +780,7 @@ async Task App(HttpContext context)
copyToAsyncCts.SetException(new Exception("This shouldn't be reached."));
}
- await using (var server = new TestServer(App, testContext, listenOptions))
+ await using (var server = new TestServer(App, testContext, configureListenOptions: _ => { }, services => SetFinOnError(services, fin)))
{
using (var connection = server.CreateConnection())
{
@@ -736,10 +805,18 @@ await connection.Send(
await requestAborted.Task.DefaultTimeout(TimeSpan.FromSeconds(30));
await responseRateTimeoutMessageLogged.Task.DefaultTimeout();
await connectionStopMessageLogged.Task.DefaultTimeout();
+ if (fin)
+ {
+ await connectionWriteFinMessageLogged.Task.DefaultTimeout();
+ }
+ else
+ {
+ await connectionWriteRstMessageLogged.Task.DefaultTimeout();
+ }
// Expect OperationCanceledException instead of IOException because the server initiated the abort due to a response rate timeout.
await Assert.ThrowsAnyAsync(() => copyToAsyncCts.Task).DefaultTimeout();
- await AssertStreamAborted(connection.Stream, responseSize);
+ await AssertStreamAborted(connection.Stream, responseSize, graceful: false);
}
}
}
@@ -985,7 +1062,7 @@ await connection.Receive(
Assert.False(requestAborted);
}
- private async Task AssertStreamAborted(Stream stream, int totalBytes)
+ private async Task AssertStreamAborted(Stream stream, int totalBytes, bool graceful)
{
var receiveBuffer = new byte[64 * 1024];
var totalReceived = 0;
@@ -998,6 +1075,8 @@ private async Task AssertStreamAborted(Stream stream, int totalBytes)
if (bytes == 0)
{
+ Assert.True(graceful, "Stream completed gracefully.");
+
break;
}
@@ -1006,7 +1085,7 @@ private async Task AssertStreamAborted(Stream stream, int totalBytes)
}
catch (IOException)
{
- // This is expected given an abort.
+ Assert.False(graceful, "Stream completed abortively.");
}
Assert.True(totalReceived < totalBytes, $"{nameof(AssertStreamAborted)} Stream completed successfully.");
@@ -1080,5 +1159,26 @@ public static TheoryData NullHeaderData
return dataset;
}
}
+
+ private static void SetFinOnError(IServiceCollection services, bool finOnError)
+ {
+#if LIBUV
+#pragma warning disable CS0618 // Type or member is obsolete
+ services.Configure(options =>
+ {
+ options.FinOnError = finOnError;
+ });
+#pragma warning restore CS0618 // Type or member is obsolete
+#elif SOCKETS
+ services.Configure(o =>
+ {
+ o.FinOnError = finOnError;
+ });
+#endif
+ services.Configure(o =>
+ {
+ o.FinOnError = finOnError;
+ });
+ }
}
}
From 18f8ab73ad928f60289763a07b10e6bd7d6de8c4 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Tue, 18 Jul 2023 12:59:03 -0700
Subject: [PATCH 014/128] Changes to get 6.0.19 build of nuget packages for
vinyl maui.
refs VINYL-14964
---
AspNetCore.sln | 32 ++++-----
global.json | 4 +-
pack.sh.txt | 66 +++++++++++++++++++
.../src/Microsoft.AspNetCore.csproj | 2 +-
.../src/Microsoft.Extensions.Features.csproj | 1 +
...t.Extensions.FileProviders.Embedded.csproj | 1 +
...oft.AspNetCore.Hosting.Abstractions.csproj | 2 +-
.../src/Microsoft.AspNetCore.Hosting.csproj | 2 +-
...NetCore.Hosting.Server.Abstractions.csproj | 2 +-
...NetCore.Authentication.Abstractions.csproj | 2 +-
...soft.AspNetCore.Authentication.Core.csproj | 2 +-
.../src/Microsoft.Net.Http.Headers.csproj | 2 +-
...rosoft.AspNetCore.Http.Abstractions.csproj | 2 +-
...icrosoft.AspNetCore.Http.Extensions.csproj | 2 +-
.../Microsoft.AspNetCore.Http.Features.csproj | 2 +-
.../Microsoft.AspNetCore.Http.Results.csproj | 2 +-
.../Http/src/Microsoft.AspNetCore.Http.csproj | 2 +-
.../src/Microsoft.AspNetCore.Metadata.csproj | 1 +
.../Owin/src/Microsoft.AspNetCore.Owin.csproj | 1 +
...oft.AspNetCore.Routing.Abstractions.csproj | 2 +-
.../src/Microsoft.AspNetCore.Routing.csproj | 2 +-
.../Microsoft.AspNetCore.WebUtilities.csproj | 2 +-
...AspNetCore.Diagnostics.Abstractions.csproj | 2 +-
.../Microsoft.AspNetCore.Diagnostics.csproj | 2 +-
.../Microsoft.AspNetCore.HostFiltering.csproj | 2 +-
.../Microsoft.AspNetCore.HttpOverrides.csproj | 2 +-
.../Microsoft.AspNetCore.Localization.csproj | 2 +-
...etCore.ResponseCaching.Abstractions.csproj | 2 +-
...soft.AspNetCore.ResponseCompression.csproj | 2 +-
.../src/Microsoft.AspNetCore.Rewrite.csproj | 2 +-
.../Microsoft.AspNetCore.StaticFiles.csproj | 2 +-
.../Microsoft.AspNetCore.WebSockets.csproj | 2 +-
...crosoft.AspNetCore.Mvc.Abstractions.csproj | 2 +-
...icrosoft.AspNetCore.Mvc.ApiExplorer.csproj | 2 +-
.../src/Microsoft.AspNetCore.Mvc.Core.csproj | 2 +-
.../Microsoft.Extensions.ObjectPool.csproj | 1 +
...t.AspNetCore.Authentication.Cookies.csproj | 2 +-
...Microsoft.AspNetCore.Authentication.csproj | 2 +-
.../Microsoft.AspNetCore.Authorization.csproj | 1 +
...oft.AspNetCore.Authorization.Policy.csproj | 2 +-
.../Microsoft.AspNetCore.CookiePolicy.csproj | 2 +-
...AspNetCore.Connections.Abstractions.csproj | 1 +
.../Microsoft.AspNetCore.Server.IIS.csproj | 2 +-
...ft.AspNetCore.Server.IISIntegration.csproj | 2 +-
...soft.AspNetCore.Server.Kestrel.Core.csproj | 2 +-
src/Servers/Kestrel/Kestrel.slnf | 6 --
...Microsoft.AspNetCore.Server.Kestrel.csproj | 2 +-
.../src/WebHostBuilderKestrelExtensions.cs | 2 +-
...tCore.Server.Kestrel.Transport.Quic.csproj | 2 +-
.../src/WebHostBuilderQuicExtensions.cs | 2 +
...re.Server.Kestrel.Transport.Sockets.csproj | 2 +-
....AspNetCore.Http.Connections.Client.csproj | 1 +
....AspNetCore.Http.Connections.Common.csproj | 1 +
...crosoft.AspNetCore.Http.Connections.csproj | 2 +-
...t.AspNetCore.SignalR.Protocols.Json.csproj | 1 +
...tCore.SignalR.Protocols.MessagePack.csproj | 1 +
...re.SignalR.Protocols.NewtonsoftJson.csproj | 1 +
...Microsoft.AspNetCore.SignalR.Common.csproj | 1 +
.../Microsoft.AspNetCore.SignalR.Core.csproj | 2 +-
.../src/Microsoft.AspNetCore.SignalR.csproj | 2 +-
.../Microsoft.Extensions.WebEncoders.csproj | 1 +
61 files changed, 142 insertions(+), 66 deletions(-)
create mode 100644 pack.sh.txt
diff --git a/AspNetCore.sln b/AspNetCore.sln
index fbf4290fac83..3a5d4c142508 100644
--- a/AspNetCore.sln
+++ b/AspNetCore.sln
@@ -9750,22 +9750,22 @@ Global
{09FFBC53-3EFF-45C4-9822-5D66089CD6AD}.Release|x64.Build.0 = Release|Any CPU
{09FFBC53-3EFF-45C4-9822-5D66089CD6AD}.Release|x86.ActiveCfg = Release|Any CPU
{09FFBC53-3EFF-45C4-9822-5D66089CD6AD}.Release|x86.Build.0 = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|arm64.ActiveCfg = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|arm64.Build.0 = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x64.ActiveCfg = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x64.Build.0 = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x86.ActiveCfg = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x86.Build.0 = Debug|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|Any CPU.Build.0 = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|arm64.ActiveCfg = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|arm64.Build.0 = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x64.ActiveCfg = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x64.Build.0 = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x86.ActiveCfg = Release|Any CPU
- {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x86.Build.0 = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|Any CPU.Build.0 = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|arm64.ActiveCfg = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|arm64.Build.0 = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x64.ActiveCfg = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x64.Build.0 = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x86.ActiveCfg = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Debug|x86.Build.0 = Debug|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|Any CPU.ActiveCfg = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|Any CPU.Build.0 = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|arm64.ActiveCfg = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|arm64.Build.0 = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x64.ActiveCfg = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x64.Build.0 = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x86.ActiveCfg = Release|Any CPU
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765}.Release|x86.Build.0 = Release|Any CPU
{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E}.Debug|arm64.ActiveCfg = Debug|Any CPU
diff --git a/global.json b/global.json
index 7b988f07763d..94b52be3e389 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "6.0.116"
+ "version": "6.0.411"
},
"tools": {
- "dotnet": "6.0.116",
+ "dotnet": "6.0.411",
"runtimes": {
"dotnet/x64": [
"2.1.30",
diff --git a/pack.sh.txt b/pack.sh.txt
new file mode 100644
index 000000000000..f9ac5300bc45
--- /dev/null
+++ b/pack.sh.txt
@@ -0,0 +1,66 @@
+#! /bin/zsh
+
+set -e
+
+(cd src/Servers/Kestrel && dotnet pack ./Kestrel.slnf)
+
+dotnet pack **/Microsoft.AspNetCore.Authentication.csproj
+dotnet pack **/Microsoft.AspNetCore.Authentication.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Authentication.Cookies.csproj
+dotnet pack **/Microsoft.AspNetCore.Authentication.Core.csproj
+dotnet pack **/Microsoft.AspNetCore.Authorization.csproj
+dotnet pack **/Microsoft.AspNetCore.CookiePolicy.csproj
+dotnet pack **/Microsoft.AspNetCore.Connections.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Diagnostics.csproj
+dotnet pack **/Microsoft.AspNetCore.HostFiltering.csproj
+dotnet pack **/Microsoft.AspNetCore.Hosting.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Hosting.csproj
+dotnet pack **/Microsoft.AspNetCore.Http.Abstractions.csproj
+
+# signalR
+dotnet pack **/Microsoft.AspNetCore.Authorization.Policy.csproj
+dotnet pack **/Microsoft.AspNetCore.Http.Connections.csproj
+dotnet pack **/Microsoft.AspNetCore.Http.Connections.Client.csproj
+dotnet pack **/Microsoft.AspNetCore.Http.Connections.Common.csproj
+dotnet pack **/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
+dotnet pack **/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
+dotnet pack **/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
+dotnet pack **/Microsoft.AspNetCore.SignalR.Common.csproj
+dotnet pack **/Microsoft.AspNetCore.SignalR.Core.csproj
+dotnet pack **/Microsoft.AspNetCore.SignalR.csproj
+dotnet pack **/Microsoft.AspNetCore.Websockets.csproj
+
+# mvc minimal
+dotnet pack **/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
+dotnet pack **/Microsoft.AspNetCore.Mvc.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Mvc.Core.csproj
+dotnet pack **/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
+
+dotnet pack **/Microsoft.AspNetCore.Http.Extensions.csproj
+dotnet pack **/Microsoft.AspNetCore.Http.Features.csproj
+dotnet pack **/Microsoft.AspNetCore.Http.Results.csproj
+dotnet pack **/Microsoft.AspNetCore.Http.csproj
+dotnet pack **/Microsoft.AspNetCore.HttpOverrides.csproj
+dotnet pack **/Microsoft.AspNetCore.Localization.csproj
+dotnet pack **/Microsoft.AspNetCore.Owin.csproj
+dotnet pack **/Microsoft.AspNetCore.Metadata.csproj
+dotnet pack **/Microsoft.AspNetCore.ResponseCompression.csproj
+dotnet pack **/Microsoft.AspNetCore.Rewrite.csproj
+dotnet pack **/Microsoft.AspNetCore.Routing.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Routing.csproj
+dotnet pack **/Microsoft.AspNetCore.Server.IIS.csproj
+dotnet pack **/Microsoft.AspNetCore.Server.IISIntegration.csproj
+dotnet pack **/Microsoft.AspNetCore.Server.Kestrel.Core.csproj
+dotnet pack **/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
+dotnet pack **/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
+dotnet pack **/Microsoft.AspNetCore.Server.Kestrel.csproj
+dotnet pack **/Microsoft.AspNetCore.StaticFiles.csproj
+dotnet pack **/Microsoft.AspNetCore.WebUtilities.csproj
+dotnet pack **/Microsoft.AspNetCore.csproj
+dotnet pack **/Microsoft.Extensions.Features.csproj
+dotnet pack **/Microsoft.Extensions.FileProviders.Embedded.csproj
+dotnet pack **/Microsoft.Extensions.ObjectPool.csproj
+dotnet pack **/Microsoft.Extensions.WebEncoders.csproj
+dotnet pack **/Microsoft.Net.Http.Headers.csproj
diff --git a/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj b/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj
index 2c66a8407db3..f05e8e3f2973 100644
--- a/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj
+++ b/src/DefaultBuilder/src/Microsoft.AspNetCore.csproj
@@ -6,7 +6,7 @@
aspnetcore
Microsoft.AspNetCore
true
- false
+ true
enable
diff --git a/src/Extensions/Features/src/Microsoft.Extensions.Features.csproj b/src/Extensions/Features/src/Microsoft.Extensions.Features.csproj
index 695dcb3b3006..ad29143827d8 100644
--- a/src/Extensions/Features/src/Microsoft.Extensions.Features.csproj
+++ b/src/Extensions/Features/src/Microsoft.Extensions.Features.csproj
@@ -13,6 +13,7 @@ Microsoft.AspNetCore.Http.Features.FeatureCollection
true
aspnetcore
enable
+ true
diff --git a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj
index 85f462c50320..a92588b79cb4 100644
--- a/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj
+++ b/src/FileProviders/Embedded/src/Microsoft.Extensions.FileProviders.Embedded.csproj
@@ -12,6 +12,7 @@
files;filesystem
true
enable
+ true
diff --git a/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj b/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj
index cdcf26e2a546..2a7a34a1222e 100644
--- a/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj
+++ b/src/Hosting/Abstractions/src/Microsoft.AspNetCore.Hosting.Abstractions.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;hosting
- false
+ true
enable
diff --git a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj
index 5ac8032197c4..b5555c0a1bf5 100644
--- a/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj
+++ b/src/Hosting/Hosting/src/Microsoft.AspNetCore.Hosting.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;hosting
- false
+ true
enable
diff --git a/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj b/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
index ef3ae05a8908..13a4f1dfe975 100644
--- a/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
+++ b/src/Hosting/Server.Abstractions/src/Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;hosting
- false
+ true
enable
diff --git a/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj b/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj
index 5f8766455320..8ddb56516eba 100644
--- a/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj
+++ b/src/Http/Authentication.Abstractions/src/Microsoft.AspNetCore.Authentication.Abstractions.csproj
@@ -5,7 +5,7 @@
true
true
aspnetcore;authentication;security
- false
+ true
enable
diff --git a/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj b/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj
index 2b0b7356b953..59aba0f9e2b2 100644
--- a/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj
+++ b/src/Http/Authentication.Core/src/Microsoft.AspNetCore.Authentication.Core.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;authentication;security
- false
+ true
enable
diff --git a/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj b/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj
index 5d9d0fa1ac79..03b7aac146ff 100644
--- a/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj
+++ b/src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj
@@ -6,7 +6,7 @@
true
true
http
- false
+ true
enable
true
diff --git a/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj b/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj
index 141f6816f86b..fe7afb3933a3 100644
--- a/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj
+++ b/src/Http/Http.Abstractions/src/Microsoft.AspNetCore.Http.Abstractions.csproj
@@ -12,7 +12,7 @@ Microsoft.AspNetCore.Http.HttpResponse
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj b/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj
index 06c4e0bb5fe8..5d335d840f3b 100644
--- a/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj
+++ b/src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj
index 787ed9e942ad..bc835d64b4ac 100644
--- a/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj
+++ b/src/Http/Http.Features/src/Microsoft.AspNetCore.Http.Features.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj b/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj
index cfa2eb2e0da9..15a6f7dc9f31 100644
--- a/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj
+++ b/src/Http/Http.Results/src/Microsoft.AspNetCore.Http.Results.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore
- false
+ true
enable
Microsoft.AspNetCore.Http.Result
diff --git a/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj b/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj
index 6213aca587f1..260ccf60980c 100644
--- a/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj
+++ b/src/Http/Http/src/Microsoft.AspNetCore.Http.csproj
@@ -7,7 +7,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj b/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj
index 92e3d59afd5e..366d1ea6c40f 100644
--- a/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj
+++ b/src/Http/Metadata/src/Microsoft.AspNetCore.Metadata.csproj
@@ -8,6 +8,7 @@
aspnetcore
enable
true
+ true
diff --git a/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj b/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj
index bf57086595bb..622d90639be4 100644
--- a/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj
+++ b/src/Http/Owin/src/Microsoft.AspNetCore.Owin.csproj
@@ -7,6 +7,7 @@
aspnetcore;owin
disable
+ true
diff --git a/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj b/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj
index db1aa002e84f..3e026ad80d4f 100644
--- a/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj
+++ b/src/Http/Routing.Abstractions/src/Microsoft.AspNetCore.Routing.Abstractions.csproj
@@ -9,7 +9,7 @@ Microsoft.AspNetCore.Routing.RouteData
true
true
aspnetcore;routing
- false
+ true
annotations
diff --git a/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj b/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj
index 436280d15f3f..a02e9dc1e540 100644
--- a/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj
+++ b/src/Http/Routing/src/Microsoft.AspNetCore.Routing.csproj
@@ -12,7 +12,7 @@
true
true
aspnetcore;routing
- false
+ true
enable
diff --git a/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj b/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj
index f5ef216dccf5..7a57c8b9565b 100644
--- a/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj
+++ b/src/Http/WebUtilities/src/Microsoft.AspNetCore.WebUtilities.csproj
@@ -8,7 +8,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj b/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
index 6696c7c0387a..acb47f165a69 100644
--- a/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
+++ b/src/Middleware/Diagnostics.Abstractions/src/Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;diagnostics
- false
+ true
enable
diff --git a/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj b/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj
index 3a479bf0a025..560aaa40ca02 100644
--- a/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj
+++ b/src/Middleware/Diagnostics/src/Microsoft.AspNetCore.Diagnostics.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;diagnostics
- false
+ true
enable
diff --git a/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj b/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj
index d041ad41ce04..5d15ee2d7cae 100644
--- a/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj
+++ b/src/Middleware/HostFiltering/src/Microsoft.AspNetCore.HostFiltering.csproj
@@ -8,7 +8,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj b/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj
index f27fe29cd711..8a8e16547d12 100644
--- a/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj
+++ b/src/Middleware/HttpOverrides/src/Microsoft.AspNetCore.HttpOverrides.csproj
@@ -8,7 +8,7 @@
true
true
aspnetcore;proxy;headers;xforwarded
- false
+ true
enable
diff --git a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj
index 0824605d9c0d..9b0a588ed009 100644
--- a/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj
+++ b/src/Middleware/Localization/src/Microsoft.AspNetCore.Localization.csproj
@@ -7,7 +7,7 @@
true
true
aspnetcore;localization
- false
+ true
enable
diff --git a/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj b/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
index 0fab4e01b07c..75f272dd0307 100644
--- a/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
+++ b/src/Middleware/ResponseCaching.Abstractions/src/Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;cache;caching
- false
+ true
enable
diff --git a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj
index 67ef58a98417..aba33c296681 100644
--- a/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj
+++ b/src/Middleware/ResponseCompression/src/Microsoft.AspNetCore.ResponseCompression.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj b/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj
index f2d2f2233038..d529cd8403cc 100644
--- a/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj
+++ b/src/Middleware/Rewrite/src/Microsoft.AspNetCore.Rewrite.csproj
@@ -9,7 +9,7 @@
true
true
aspnetcore;urlrewrite;mod_rewrite
- false
+ true
enable
diff --git a/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj b/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj
index 7b36e43f674d..fca0a5a4d105 100644
--- a/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj
+++ b/src/Middleware/StaticFiles/src/Microsoft.AspNetCore.StaticFiles.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;staticfiles
- false
+ true
enable
diff --git a/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj b/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj
index 1443b5fae957..fcef243aee1a 100644
--- a/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj
+++ b/src/Middleware/WebSockets/src/Microsoft.AspNetCore.WebSockets.csproj
@@ -7,7 +7,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj b/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj
index b277931317a3..2d2c54bab54f 100644
--- a/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj
+++ b/src/Mvc/Mvc.Abstractions/src/Microsoft.AspNetCore.Mvc.Abstractions.csproj
@@ -8,7 +8,7 @@ Microsoft.AspNetCore.Mvc.IActionResult
true
true
aspnetcore;aspnetcoremvc
- false
+ true
diff --git a/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj b/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
index b55223a8cef1..b1b2ce152410 100644
--- a/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
+++ b/src/Mvc/Mvc.ApiExplorer/src/Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;aspnetcoremvc
- false
+ true
diff --git a/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj b/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj
index a0b45ab9d83a..5114ce0a90d9 100644
--- a/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj
+++ b/src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.csproj
@@ -14,7 +14,7 @@ Microsoft.AspNetCore.Mvc.RouteAttribute
true
true
aspnetcore;aspnetcoremvc
- false
+ true
enable
diff --git a/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj b/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj
index ab96bc0facee..1a4a748eeb61 100644
--- a/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj
+++ b/src/ObjectPool/src/Microsoft.Extensions.ObjectPool.csproj
@@ -7,6 +7,7 @@
pooling
true
enable
+ true
diff --git a/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj b/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj
index cc235c07f497..d23869ae52df 100644
--- a/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj
+++ b/src/Security/Authentication/Cookies/src/Microsoft.AspNetCore.Authentication.Cookies.csproj
@@ -7,7 +7,7 @@
$(DefineConstants);SECURITY
true
aspnetcore;authentication;security
- false
+ true
enable
diff --git a/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj b/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj
index 4598a5b8660c..932cbb753bfa 100644
--- a/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj
+++ b/src/Security/Authentication/Core/src/Microsoft.AspNetCore.Authentication.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;authentication;security
- false
+ true
enable
diff --git a/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj b/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj
index ac6336421579..3c119b3db452 100644
--- a/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj
+++ b/src/Security/Authorization/Core/src/Microsoft.AspNetCore.Authorization.csproj
@@ -12,6 +12,7 @@ Microsoft.AspNetCore.Authorization.AuthorizeAttribute
aspnetcore;authorization
enable
true
+ true
diff --git a/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj b/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj
index 088318e51324..9b29774438de 100644
--- a/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj
+++ b/src/Security/Authorization/Policy/src/Microsoft.AspNetCore.Authorization.Policy.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;authorization
- false
+ true
enable
diff --git a/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj b/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj
index b0c5252e805e..fe7cbb944d57 100644
--- a/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj
+++ b/src/Security/CookiePolicy/src/Microsoft.AspNetCore.CookiePolicy.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj
index b5434f188ff1..a569bc43725c 100644
--- a/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj
+++ b/src/Servers/Connections.Abstractions/src/Microsoft.AspNetCore.Connections.Abstractions.csproj
@@ -9,6 +9,7 @@
aspnetcore
CS1591;$(NoWarn)
enable
+ true
diff --git a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
index b575db4f9f1c..2268c30ac195 100644
--- a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
+++ b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
@@ -9,7 +9,7 @@
aspnetcore;iis
true
$(DefaultNetCoreTargetFramework)
- false
+ true
enable
diff --git a/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj b/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj
index aa7be1b8159f..3090eb3ad1b4 100644
--- a/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj
+++ b/src/Servers/IIS/IISIntegration/src/Microsoft.AspNetCore.Server.IISIntegration.csproj
@@ -7,7 +7,7 @@
true
aspnetcore;iis
true
- false
+ true
enable
diff --git a/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj b/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj
index bf9026ebb236..35568e34fddd 100644
--- a/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj
+++ b/src/Servers/Kestrel/Core/src/Microsoft.AspNetCore.Server.Kestrel.Core.csproj
@@ -8,7 +8,7 @@
aspnetcore;kestrel
true
CS1591;$(NoWarn)
- false
+ true
$(DefineConstants);KESTREL
enable
diff --git a/src/Servers/Kestrel/Kestrel.slnf b/src/Servers/Kestrel/Kestrel.slnf
index f5809a62e74b..bbcc074da7c6 100644
--- a/src/Servers/Kestrel/Kestrel.slnf
+++ b/src/Servers/Kestrel/Kestrel.slnf
@@ -19,10 +19,6 @@
"src\\Servers\\Kestrel\\Core\\test\\Microsoft.AspNetCore.Server.Kestrel.Core.Tests.csproj",
"src\\Servers\\Kestrel\\Kestrel\\src\\Microsoft.AspNetCore.Server.Kestrel.csproj",
"src\\Servers\\Kestrel\\Kestrel\\test\\Microsoft.AspNetCore.Server.Kestrel.Tests.csproj",
- "src\\Servers\\Kestrel\\Transport.Libuv\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.csproj",
- "src\\Servers\\Kestrel\\Transport.Libuv\\test\\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.csproj",
- "src\\Servers\\Kestrel\\Transport.Quic\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj",
- "src\\Servers\\Kestrel\\Transport.Quic\\test\\Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests.csproj",
"src\\Servers\\Kestrel\\Transport.Sockets\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj",
"src\\Servers\\Kestrel\\perf\\Microbenchmarks\\Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks.csproj",
"src\\Servers\\Kestrel\\samples\\Http2SampleApp\\Http2SampleApp.csproj",
@@ -35,8 +31,6 @@
"src\\Servers\\Kestrel\\samples\\http2cat\\http2cat.csproj",
"src\\Servers\\Kestrel\\test\\InMemory.FunctionalTests\\InMemory.FunctionalTests.csproj",
"src\\Servers\\Kestrel\\test\\Interop.FunctionalTests\\Interop.FunctionalTests.csproj",
- "src\\Servers\\Kestrel\\test\\Libuv.BindTests\\Libuv.BindTests.csproj",
- "src\\Servers\\Kestrel\\test\\Libuv.FunctionalTests\\Libuv.FunctionalTests.csproj",
"src\\Servers\\Kestrel\\test\\Sockets.BindTests\\Sockets.BindTests.csproj",
"src\\Servers\\Kestrel\\test\\Sockets.FunctionalTests\\Sockets.FunctionalTests.csproj",
"src\\Servers\\Kestrel\\tools\\CodeGenerator\\CodeGenerator.csproj",
diff --git a/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj b/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj
index 106684e5cdf6..dbebc7aa0cf4 100644
--- a/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj
+++ b/src/Servers/Kestrel/Kestrel/src/Microsoft.AspNetCore.Server.Kestrel.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;kestrel
- false
+ true
enable
diff --git a/src/Servers/Kestrel/Kestrel/src/WebHostBuilderKestrelExtensions.cs b/src/Servers/Kestrel/Kestrel/src/WebHostBuilderKestrelExtensions.cs
index 568115cced98..6a3c123f47de 100644
--- a/src/Servers/Kestrel/Kestrel/src/WebHostBuilderKestrelExtensions.cs
+++ b/src/Servers/Kestrel/Kestrel/src/WebHostBuilderKestrelExtensions.cs
@@ -30,7 +30,7 @@ public static class WebHostBuilderKestrelExtensions
public static IWebHostBuilder UseKestrel(this IWebHostBuilder hostBuilder)
{
#pragma warning disable CA2252 // Preview Features
- hostBuilder.UseQuic();
+ //hostBuilder.UseQuic();
#pragma warning restore CA2252
return hostBuilder.ConfigureServices(services =>
{
diff --git a/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj b/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
index 145612775bf8..9427b91778fd 100644
--- a/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
+++ b/src/Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
@@ -8,7 +8,7 @@
aspnetcore;kestrel
true
CA1416;CS1591;CS0436;$(NoWarn)
- false
+ true
enable
True
diff --git a/src/Servers/Kestrel/Transport.Quic/src/WebHostBuilderQuicExtensions.cs b/src/Servers/Kestrel/Transport.Quic/src/WebHostBuilderQuicExtensions.cs
index 508809773554..cc48d42aeeed 100644
--- a/src/Servers/Kestrel/Transport.Quic/src/WebHostBuilderQuicExtensions.cs
+++ b/src/Servers/Kestrel/Transport.Quic/src/WebHostBuilderQuicExtensions.cs
@@ -18,6 +18,7 @@ public static class WebHostBuilderQuicExtensions
[RequiresPreviewFeatures]
public static IWebHostBuilder UseQuic(this IWebHostBuilder hostBuilder)
{
+ /*
if (QuicImplementationProviders.Default.IsSupported)
{
return hostBuilder.ConfigureServices(services =>
@@ -25,6 +26,7 @@ public static IWebHostBuilder UseQuic(this IWebHostBuilder hostBuilder)
services.AddSingleton();
});
}
+ */
return hostBuilder;
}
diff --git a/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj b/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
index 785d52aa0ba3..6369c3b9a8b5 100644
--- a/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
+++ b/src/Servers/Kestrel/Transport.Sockets/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
@@ -8,7 +8,7 @@
aspnetcore;kestrel
true
CS1591;$(NoWarn)
- false
+ true
enable
diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj b/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj
index 48d0c41d0b1b..413e0f4d9c71 100644
--- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj
+++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Microsoft.AspNetCore.Http.Connections.Client.csproj
@@ -4,6 +4,7 @@
Client for ASP.NET Core Connection Handlers
$(DefaultNetCoreTargetFramework);$(DefaultNetFxTargetFramework);netstandard2.0;netstandard2.1
enable
+ true
diff --git a/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj b/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj
index e414aff297c8..55a6f46755bf 100644
--- a/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj
+++ b/src/SignalR/common/Http.Connections.Common/src/Microsoft.AspNetCore.Http.Connections.Common.csproj
@@ -8,6 +8,7 @@
Microsoft.AspNetCore.Http.Connections
true
enable
+ true
diff --git a/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj b/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj
index cd4ee8fd2d68..1e34fd407c67 100644
--- a/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj
+++ b/src/SignalR/common/Http.Connections/src/Microsoft.AspNetCore.Http.Connections.csproj
@@ -5,7 +5,7 @@
$(DefaultNetCoreTargetFramework)
true
true
- false
+ true
enable
diff --git a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
index 34a5f17dd19d..558d3089371d 100644
--- a/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
+++ b/src/SignalR/common/Protocols.Json/src/Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
@@ -8,6 +8,7 @@
Microsoft.AspNetCore.SignalR
true
enable
+ true
diff --git a/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj b/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
index 69554b03f11a..63c2323e8360 100644
--- a/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
+++ b/src/SignalR/common/Protocols.MessagePack/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
@@ -6,6 +6,7 @@
Microsoft.AspNetCore.SignalR
true
enable
+ true
diff --git a/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj b/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
index 51d392697c8d..0c356d5ba3e4 100644
--- a/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
+++ b/src/SignalR/common/Protocols.NewtonsoftJson/src/Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
@@ -6,6 +6,7 @@
Microsoft.AspNetCore.SignalR
true
enable
+ true
diff --git a/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj b/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj
index 967d687ba2b7..87bb90aa1601 100644
--- a/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj
+++ b/src/SignalR/common/SignalR.Common/src/Microsoft.AspNetCore.SignalR.Common.csproj
@@ -8,6 +8,7 @@
Microsoft.AspNetCore.SignalR
true
enable
+ true
diff --git a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj
index c5ae1cb3718f..163260c2af82 100644
--- a/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj
+++ b/src/SignalR/server/Core/src/Microsoft.AspNetCore.SignalR.Core.csproj
@@ -5,7 +5,7 @@
$(DefaultNetCoreTargetFramework)
true
Microsoft.AspNetCore.SignalR
- false
+ true
enable
diff --git a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj
index bbe11c2ab0e9..88debaca1875 100644
--- a/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj
+++ b/src/SignalR/server/SignalR/src/Microsoft.AspNetCore.SignalR.csproj
@@ -3,7 +3,7 @@
Components for providing real-time bi-directional communication across the Web.
$(DefaultNetCoreTargetFramework)
true
- false
+ true
enable
diff --git a/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj b/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj
index 6f832eb8a11d..74938a48b60d 100644
--- a/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj
+++ b/src/WebEncoders/src/Microsoft.Extensions.WebEncoders.csproj
@@ -8,6 +8,7 @@
aspnetcore
true
enable
+ true
From 71fb26ba5f95d1302ca9ffe180fdb13d3e6a742d Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Tue, 18 Jul 2023 15:15:31 -0700
Subject: [PATCH 015/128] A powershell script to build the nuget packages vinyl
maui requires.
---
pack.ps1 | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
create mode 100644 pack.ps1
diff --git a/pack.ps1 b/pack.ps1
new file mode 100644
index 000000000000..86b70522bacd
--- /dev/null
+++ b/pack.ps1
@@ -0,0 +1,96 @@
+function Build-Project
+{
+ param (
+ [string]$ProjectName
+ )
+
+ try {
+
+ }
+ catch {
+ <#Do this if a terminating exception happens#>
+ }
+ $ProjectFiles = @(Get-ChildItem -Path . -Filter $ProjectName -Recurse -File)
+ if ($ProjectFiles.Length -eq 0) {
+ throw "Couldn't find project $ProjectName."
+ }
+ if ($ProjectFiles.Length -gt 1) {
+ throw "Too many results for project $ProjectName."
+ }
+
+ $ProjectFullPath = $ProjectFiles[0].FullName
+
+ dotnet pack $ProjectFullPath
+ if (!$?) {
+ throw "Failed to build project $ProjectFullPath."
+ }
+}
+
+function Build-AspNetCore {
+ Push-Location -Path src/Servers/Kestrel
+ dotnet pack Kestrel.slnf
+ Pop-Location
+
+ # Main libraries
+ Build-Project Microsoft.AspNetCore.Authentication.csproj
+ Build-Project Microsoft.AspNetCore.Authentication.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Authentication.Cookies.csproj
+ Build-Project Microsoft.AspNetCore.Authentication.Core.csproj
+ Build-Project Microsoft.AspNetCore.Authorization.csproj
+ Build-Project Microsoft.AspNetCore.CookiePolicy.csproj
+ Build-Project Microsoft.AspNetCore.Connections.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Diagnostics.csproj
+ Build-Project Microsoft.AspNetCore.HostFiltering.csproj
+ Build-Project Microsoft.AspNetCore.Hosting.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Hosting.csproj
+ Build-Project Microsoft.AspNetCore.Http.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Http.Extensions.csproj
+ Build-Project Microsoft.AspNetCore.Http.Features.csproj
+ Build-Project Microsoft.AspNetCore.Http.Results.csproj
+ Build-Project Microsoft.AspNetCore.Http.csproj
+ Build-Project Microsoft.AspNetCore.HttpOverrides.csproj
+ Build-Project Microsoft.AspNetCore.Localization.csproj
+ Build-Project Microsoft.AspNetCore.Owin.csproj
+ Build-Project Microsoft.AspNetCore.Metadata.csproj
+ Build-Project Microsoft.AspNetCore.ResponseCompression.csproj
+ Build-Project Microsoft.AspNetCore.Rewrite.csproj
+ Build-Project Microsoft.AspNetCore.Routing.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Routing.csproj
+ Build-Project Microsoft.AspNetCore.Server.IIS.csproj
+ Build-Project Microsoft.AspNetCore.Server.IISIntegration.csproj
+ Build-Project Microsoft.AspNetCore.Server.Kestrel.Core.csproj
+ Build-Project Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
+ Build-Project Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
+ Build-Project Microsoft.AspNetCore.Server.Kestrel.csproj
+ Build-Project Microsoft.AspNetCore.StaticFiles.csproj
+ Build-Project Microsoft.AspNetCore.WebUtilities.csproj
+ Build-Project Microsoft.AspNetCore.csproj
+ Build-Project Microsoft.Extensions.Features.csproj
+ Build-Project Microsoft.Extensions.FileProviders.Embedded.csproj
+ Build-Project Microsoft.Extensions.ObjectPool.csproj
+ Build-Project Microsoft.Extensions.WebEncoders.csproj
+ Build-Project Microsoft.Net.Http.Headers.csproj
+
+ # signalR
+ Build-Project Microsoft.AspNetCore.Authorization.Policy.csproj
+ Build-Project Microsoft.AspNetCore.Http.Connections.csproj
+ Build-Project Microsoft.AspNetCore.Http.Connections.Client.csproj
+ Build-Project Microsoft.AspNetCore.Http.Connections.Common.csproj
+ Build-Project Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
+ Build-Project Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
+ Build-Project Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
+ Build-Project Microsoft.AspNetCore.SignalR.Common.csproj
+ Build-Project Microsoft.AspNetCore.SignalR.Core.csproj
+ Build-Project Microsoft.AspNetCore.SignalR.csproj
+ Build-Project Microsoft.AspNetCore.Websockets.csproj
+
+ # mvc minimal api
+ Build-Project Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
+ Build-Project Microsoft.AspNetCore.Mvc.Abstractions.csproj
+ Build-Project Microsoft.AspNetCore.Mvc.Core.csproj
+ Build-Project Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
+}
+
+Build-AspNetCore
\ No newline at end of file
From c9e083ccadd8446cc7dcd34b1763abdb4aebe157 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Tue, 18 Jul 2023 15:16:04 -0700
Subject: [PATCH 016/128] I guess I missed adding this commit...
refs VINYL-14964
---
AspNetCore.sln | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/AspNetCore.sln b/AspNetCore.sln
index 3a5d4c142508..07318c29e91f 100644
--- a/AspNetCore.sln
+++ b/AspNetCore.sln
@@ -11171,7 +11171,7 @@ Global
{17F28812-983E-4415-A55D-842DD7EC6887} = {627BE8B3-59E6-4F1D-8C9C-76B804D41724}
{A07D3B13-388B-444F-9E37-DDC0787C4690} = {17F28812-983E-4415-A55D-842DD7EC6887}
{09FFBC53-3EFF-45C4-9822-5D66089CD6AD} = {17F28812-983E-4415-A55D-842DD7EC6887}
- {A1D02CE6-1077-410A-81CB-D4BD500FD765} = {0508E463-0269-40C9-B5C2-3B600FB2A28B}
+# {A1D02CE6-1077-410A-81CB-D4BD500FD765} = {0508E463-0269-40C9-B5C2-3B600FB2A28B}
{3044DFA5-DE4F-44D8-8DD8-EDF547BE513E} = {C445B129-0A4D-41F5-8347-6534B6B12303}
{4BD6F0DB-BE9C-4C54-B52A-D20B88855ED5} = {C445B129-0A4D-41F5-8347-6534B6B12303}
{6CCCF618-2E70-4870-B39F-32C016FE08F0} = {088C37A5-30D2-40FB-B031-D163CFBED006}
From d0fbfa868f180b85687c19ee20773400ef393c19 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Tue, 18 Jul 2023 15:19:50 -0700
Subject: [PATCH 017/128] Ensure Release config is used for nuget packages.
refs VINYL-14964
---
pack.ps1 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pack.ps1 b/pack.ps1
index 86b70522bacd..eefe9a81a5da 100644
--- a/pack.ps1
+++ b/pack.ps1
@@ -1,3 +1,6 @@
+# Globals... for now.
+$Configuration = "Release"
+
function Build-Project
{
param (
@@ -20,7 +23,7 @@ function Build-Project
$ProjectFullPath = $ProjectFiles[0].FullName
- dotnet pack $ProjectFullPath
+ dotnet pack -c $Configuration $ProjectFullPath
if (!$?) {
throw "Failed to build project $ProjectFullPath."
}
From a77dac8f905838e93658baecdd6778b840a061f3 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Tue, 18 Jul 2023 16:33:55 -0700
Subject: [PATCH 018/128] Downgrade sdk requirement to 6.0.7 which matches
build server.
refs VINYL-14964
---
global.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/global.json b/global.json
index 94b52be3e389..0c36880a1a04 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "6.0.411"
+ "version": "6.0.302"
},
"tools": {
- "dotnet": "6.0.411",
+ "dotnet": "6.0.302",
"runtimes": {
"dotnet/x64": [
"2.1.30",
From 73d24ad1197b86dbb8fe1a0fb44bdc5772e192c1 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Wed, 19 Jul 2023 14:12:06 -0700
Subject: [PATCH 019/128] Remove IIS from projects to pack.
refs VINYL-14964
---
pack.ps1 | 4 +---
pack.sh.txt | 2 --
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/pack.ps1 b/pack.ps1
index eefe9a81a5da..6b5e86afcb57 100644
--- a/pack.ps1
+++ b/pack.ps1
@@ -61,8 +61,6 @@ function Build-AspNetCore {
Build-Project Microsoft.AspNetCore.Rewrite.csproj
Build-Project Microsoft.AspNetCore.Routing.Abstractions.csproj
Build-Project Microsoft.AspNetCore.Routing.csproj
- Build-Project Microsoft.AspNetCore.Server.IIS.csproj
- Build-Project Microsoft.AspNetCore.Server.IISIntegration.csproj
Build-Project Microsoft.AspNetCore.Server.Kestrel.Core.csproj
Build-Project Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
Build-Project Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
@@ -96,4 +94,4 @@ function Build-AspNetCore {
Build-Project Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
}
-Build-AspNetCore
\ No newline at end of file
+Build-AspNetCore
diff --git a/pack.sh.txt b/pack.sh.txt
index f9ac5300bc45..80ca2329acd6 100644
--- a/pack.sh.txt
+++ b/pack.sh.txt
@@ -50,8 +50,6 @@ dotnet pack **/Microsoft.AspNetCore.ResponseCompression.csproj
dotnet pack **/Microsoft.AspNetCore.Rewrite.csproj
dotnet pack **/Microsoft.AspNetCore.Routing.Abstractions.csproj
dotnet pack **/Microsoft.AspNetCore.Routing.csproj
-dotnet pack **/Microsoft.AspNetCore.Server.IIS.csproj
-dotnet pack **/Microsoft.AspNetCore.Server.IISIntegration.csproj
dotnet pack **/Microsoft.AspNetCore.Server.Kestrel.Core.csproj
dotnet pack **/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
dotnet pack **/Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
From 4865c62fb4dfb8dcb8b1ff3bc9801bed0534d26a Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Wed, 19 Jul 2023 14:31:17 -0700
Subject: [PATCH 020/128] Log which project is being built.
refs VINYL-14964
---
pack.ps1 | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/pack.ps1 b/pack.ps1
index 6b5e86afcb57..4fc56a37fc4e 100644
--- a/pack.ps1
+++ b/pack.ps1
@@ -7,12 +7,6 @@ function Build-Project
[string]$ProjectName
)
- try {
-
- }
- catch {
- <#Do this if a terminating exception happens#>
- }
$ProjectFiles = @(Get-ChildItem -Path . -Filter $ProjectName -Recurse -File)
if ($ProjectFiles.Length -eq 0) {
throw "Couldn't find project $ProjectName."
@@ -23,6 +17,8 @@ function Build-Project
$ProjectFullPath = $ProjectFiles[0].FullName
+ WriteOutput "Building $ProjectFullPath"
+
dotnet pack -c $Configuration $ProjectFullPath
if (!$?) {
throw "Failed to build project $ProjectFullPath."
From 9ba756e4f130a763480b7bd96101d046c684b5a5 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Wed, 19 Jul 2023 14:38:22 -0700
Subject: [PATCH 021/128] Fix typo.
refs VINYL-14964
---
pack.ps1 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pack.ps1 b/pack.ps1
index 4fc56a37fc4e..98ca2b2a4720 100644
--- a/pack.ps1
+++ b/pack.ps1
@@ -17,8 +17,8 @@ function Build-Project
$ProjectFullPath = $ProjectFiles[0].FullName
- WriteOutput "Building $ProjectFullPath"
-
+ Write-Output "Building $ProjectFullPath"
+
dotnet pack -c $Configuration $ProjectFullPath
if (!$?) {
throw "Failed to build project $ProjectFullPath."
From 2b28c0aa7e46c8202a61da8463215753d7ac80b4 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Wed, 19 Jul 2023 15:49:06 -0700
Subject: [PATCH 022/128] Another attempt to build...
refs VINYL-14964
---
pack-list.txt | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
pack.sh | 11 +++++++++++
2 files changed, 64 insertions(+)
create mode 100644 pack-list.txt
create mode 100755 pack.sh
diff --git a/pack-list.txt b/pack-list.txt
new file mode 100644
index 000000000000..63cc713bc3d6
--- /dev/null
+++ b/pack-list.txt
@@ -0,0 +1,53 @@
+Microsoft.AspNetCore.Authentication.csproj
+Microsoft.AspNetCore.Authentication.Abstractions.csproj
+Microsoft.AspNetCore.Authentication.Cookies.csproj
+Microsoft.AspNetCore.Authentication.Core.csproj
+Microsoft.AspNetCore.Authorization.csproj
+Microsoft.AspNetCore.CookiePolicy.csproj
+Microsoft.AspNetCore.Connections.Abstractions.csproj
+Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
+Microsoft.AspNetCore.Diagnostics.csproj
+Microsoft.AspNetCore.HostFiltering.csproj
+Microsoft.AspNetCore.Hosting.Abstractions.csproj
+Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
+Microsoft.AspNetCore.Hosting.csproj
+Microsoft.AspNetCore.Http.Abstractions.csproj
+Microsoft.AspNetCore.Http.Extensions.csproj
+Microsoft.AspNetCore.Http.Features.csproj
+Microsoft.AspNetCore.Http.Results.csproj
+Microsoft.AspNetCore.Http.csproj
+Microsoft.AspNetCore.HttpOverrides.csproj
+Microsoft.AspNetCore.Localization.csproj
+Microsoft.AspNetCore.Owin.csproj
+Microsoft.AspNetCore.Metadata.csproj
+Microsoft.AspNetCore.ResponseCompression.csproj
+Microsoft.AspNetCore.Rewrite.csproj
+Microsoft.AspNetCore.Routing.Abstractions.csproj
+Microsoft.AspNetCore.Routing.csproj
+Microsoft.AspNetCore.Server.Kestrel.Core.csproj
+Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
+Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
+Microsoft.AspNetCore.Server.Kestrel.csproj
+Microsoft.AspNetCore.StaticFiles.csproj
+Microsoft.AspNetCore.WebUtilities.csproj
+Microsoft.AspNetCore.csproj
+Microsoft.Extensions.Features.csproj
+Microsoft.Extensions.FileProviders.Embedded.csproj
+Microsoft.Extensions.ObjectPool.csproj
+Microsoft.Extensions.WebEncoders.csproj
+Microsoft.Net.Http.Headers.csproj
+Microsoft.AspNetCore.Authorization.Policy.csproj
+Microsoft.AspNetCore.Http.Connections.csproj
+Microsoft.AspNetCore.Http.Connections.Client.csproj
+Microsoft.AspNetCore.Http.Connections.Common.csproj
+Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
+Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
+Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
+Microsoft.AspNetCore.SignalR.Common.csproj
+Microsoft.AspNetCore.SignalR.Core.csproj
+Microsoft.AspNetCore.SignalR.csproj
+Microsoft.AspNetCore.Websockets.csproj
+Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
+Microsoft.AspNetCore.Mvc.Abstractions.csproj
+Microsoft.AspNetCore.Mvc.Core.csproj
+Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
\ No newline at end of file
diff --git a/pack.sh b/pack.sh
new file mode 100755
index 000000000000..6510d2dd6476
--- /dev/null
+++ b/pack.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+configuration=Release
+#arch=x64,arm,arm64
+
+cat pack-list.txt | while read line || [[ -n $line ]];
+do
+ echo $line
+ fullPath=$(pwd)/$(find . -iname "$line")
+ ./dockerbuild.sh bionic --configuration $configuration --projects $fullPath
+done
From 7f76f0e59dbf5bc32ed47e634c5c3c11e5b91dea Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Wed, 19 Jul 2023 16:32:52 -0700
Subject: [PATCH 023/128] Speed up docker build...
refs VINYL-14964
---
dockerpack.sh | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++
pack.sh | 2 +-
2 files changed, 153 insertions(+), 1 deletion(-)
create mode 100755 dockerpack.sh
diff --git a/dockerpack.sh b/dockerpack.sh
new file mode 100755
index 000000000000..d614f81f2481
--- /dev/null
+++ b/dockerpack.sh
@@ -0,0 +1,152 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+#
+# variables
+#
+
+RESET="\033[0m"
+RED="\033[0;31m"
+YELLOW="\033[0;33m"
+MAGENTA="\033[0;95m"
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+build_args=()
+docker_args=()
+
+#
+# Functions
+#
+__usage() {
+ echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] ...]"
+ echo ""
+ echo "Arguments:"
+ echo " image The docker image to use."
+ echo " ... Arguments passed to the command. Variable number of arguments allowed."
+ echo ""
+ echo "Options:"
+ echo " -v, --volume An additional volume mount to add to the build container"
+ echo " -e, --env Additional environment variables to add to the build container"
+ echo ""
+ echo "Description:"
+ echo " This will run build.sh inside the dockerfile as defined in eng/docker/\$image.Dockerfile."
+
+ if [[ "${1:-}" != '--no-exit' ]]; then
+ exit 2
+ fi
+}
+
+
+__error() {
+ echo -e "${RED}error: $*${RESET}" 1>&2
+}
+
+__warn() {
+ echo -e "${YELLOW}warning: $*${RESET}"
+}
+
+__machine_has() {
+ hash "$1" > /dev/null 2>&1
+ return $?
+}
+
+#
+# main
+#
+
+image="${1:-}"
+shift || True
+
+while [[ $# -gt 0 ]]; do
+ case $1 in
+ -\?|-h|--help)
+ __usage --no-exit
+ exit 0
+ ;;
+ -v|--volume)
+ shift
+ volume_spec="${1:-}"
+ [ -z "$volume_spec" ] && __error "Missing value for parameter --volume" && __usage
+ docker_args[${#docker_args[*]}]="--volume"
+ docker_args[${#docker_args[*]}]="$volume_spec"
+ ;;
+ -e|--env)
+ shift
+ env_var="${1:-}"
+ [ -z "$env_var" ] && __error "Missing value for parameter --env" && __usage
+ docker_args[${#docker_args[*]}]="-e"
+ docker_args[${#docker_args[*]}]="$env_var"
+ ;;
+ *)
+ build_args[${#build_args[*]}]="$1"
+ ;;
+ esac
+ shift
+done
+
+if [ -z "$image" ]; then
+ __usage --no-exit
+ __error 'Missing required argument: image'
+ exit 1
+fi
+
+if ! __machine_has docker; then
+ __error 'Missing required command: docker'
+ exit 1
+fi
+
+commit_hash="$(git rev-parse HEAD || true)"
+
+if [ ! -z "$commit_hash" ]; then
+ build_args[${#build_args[*]}]="-p:SourceRevisionId=$commit_hash"
+fi
+
+dockerfile="$DIR/eng/docker/$image.Dockerfile"
+tagname="aspnetcore-build-$image"
+
+# Use docker pull with retries to pre-pull the image need by the dockerfile
+# docker build regularly fails with TLS handshake issues for unclear reasons.
+base_imagename="$(grep -E -o 'FROM (.*)' $dockerfile | cut -c 6-)"
+pull_retries=3
+while [ $pull_retries -gt 0 ]; do
+ failed=false
+ docker pull $base_imagename || failed=true
+ if [ "$failed" = true ]; then
+ let pull_retries=pull_retries-1
+ echo -e "${YELLOW}Failed to pull $base_imagename Retries left: $pull_retries.${RESET}"
+ sleep 1
+ else
+ pull_retries=0
+ fi
+done
+
+docker build "$(dirname "$dockerfile")" \
+ --build-arg "USER=$(whoami)" \
+ --build-arg "USER_ID=$(id -u)" \
+ --build-arg "GROUP_ID=$(id -g)" \
+ --build-arg "WORKDIR=$DIR" \
+ --tag $tagname \
+ -f "$dockerfile"
+
+docker run \
+ --rm \
+ -t \
+ -e TF_BUILD \
+ -e BUILD_NUMBER \
+ -e BUILD_BUILDID \
+ -e SYSTEM_TEAMPROJECT \
+ -e BUILD_BUILDNUMBER \
+ -e BUILD_REPOSITORY_NAME \
+ -e BUILD_REPOSITORY_URI \
+ -e BUILD_REPOSITORY_NAME \
+ -e BUILD_SOURCEVERSION \
+ -e BUILD_SOURCEBRANCH \
+ -e SYSTEM_DEFINITIONID \
+ -e SYSTEM_TEAMFOUNDATIONCOLLECTIONURI \
+ -e DOTNET_CLI_TELEMETRY_OPTOUT \
+ -e Configuration \
+ -v "$DIR:$DIR" \
+ ${docker_args[@]+"${docker_args[@]}"} \
+ $tagname \
+ ./packfordocker.sh \
+ ${build_args[@]+"${build_args[@]}"}
diff --git a/pack.sh b/pack.sh
index 6510d2dd6476..f08abc0c442f 100755
--- a/pack.sh
+++ b/pack.sh
@@ -7,5 +7,5 @@ cat pack-list.txt | while read line || [[ -n $line ]];
do
echo $line
fullPath=$(pwd)/$(find . -iname "$line")
- ./dockerbuild.sh bionic --configuration $configuration --projects $fullPath
+ ./eng/build.sh --configuration $configuration --projects $fullPath
done
From d1fa5464c6b9a8cef6306159c86f1817222974b6 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 20 Jul 2023 08:59:19 -0700
Subject: [PATCH 024/128] Another build attempt with docker.
refs VINYL-14964
---
dockerpack.sh | 2 +-
pack.sh | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dockerpack.sh b/dockerpack.sh
index d614f81f2481..0d70cc4dd83b 100755
--- a/dockerpack.sh
+++ b/dockerpack.sh
@@ -148,5 +148,5 @@ docker run \
-v "$DIR:$DIR" \
${docker_args[@]+"${docker_args[@]}"} \
$tagname \
- ./packfordocker.sh \
+ ./pack.sh \
${build_args[@]+"${build_args[@]}"}
diff --git a/pack.sh b/pack.sh
index f08abc0c442f..2d86f53aa4ef 100755
--- a/pack.sh
+++ b/pack.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+set -euo pipefail
+
configuration=Release
#arch=x64,arm,arm64
From 5030504aeb7395411583c8a9440cea1c6f85ef31 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 20 Jul 2023 09:08:26 -0700
Subject: [PATCH 025/128] Try jamming in a HOME var
refs VINYL-14964
---
dockerpack.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dockerpack.sh b/dockerpack.sh
index 0d70cc4dd83b..03298de73bd7 100755
--- a/dockerpack.sh
+++ b/dockerpack.sh
@@ -128,6 +128,7 @@ docker build "$(dirname "$dockerfile")" \
--tag $tagname \
-f "$dockerfile"
+# Vinyl: Added HOME variable as the teamcity linux build agent does not have a HOME folder by default.
docker run \
--rm \
-t \
@@ -145,6 +146,7 @@ docker run \
-e SYSTEM_TEAMFOUNDATIONCOLLECTIONURI \
-e DOTNET_CLI_TELEMETRY_OPTOUT \
-e Configuration \
+ -e HOME="$DIR" \
-v "$DIR:$DIR" \
${docker_args[@]+"${docker_args[@]}"} \
$tagname \
From 0a4605e2ce48657ab0b1876a4b95c0f585b30cd3 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 20 Jul 2023 09:19:29 -0700
Subject: [PATCH 026/128] Another hack.
refs VINYL-14964
---
eng/common/tools.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index e555c34269f6..14eb5a5ce6d3 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -121,7 +121,11 @@ function InitializeDotNetCli {
# LTTNG is the logging infrastructure used by Core CLR. Need this variable set
# so it doesn't output warnings to the console.
- export LTTNG_HOME="$HOME"
+ # Vinyl: HOME isn't set for linux teamcity build agent...
+ export LTTNG_HOME="."
+ if [[ -v HOME -eq 1 ]]; then
+ export LTTNG_HOME="$HOME"
+ fi
# Source Build uses DotNetCoreSdkDir variable
if [[ -n "${DotNetCoreSdkDir:-}" ]]; then
From 1da7c493c163209035f6dd07d5b172bd840e8d04 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 20 Jul 2023 09:22:19 -0700
Subject: [PATCH 027/128] Another approach.
refs VINYL-14964
---
eng/common/tools.sh | 6 +-----
pack.sh | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/eng/common/tools.sh b/eng/common/tools.sh
index 14eb5a5ce6d3..e555c34269f6 100755
--- a/eng/common/tools.sh
+++ b/eng/common/tools.sh
@@ -121,11 +121,7 @@ function InitializeDotNetCli {
# LTTNG is the logging infrastructure used by Core CLR. Need this variable set
# so it doesn't output warnings to the console.
- # Vinyl: HOME isn't set for linux teamcity build agent...
- export LTTNG_HOME="."
- if [[ -v HOME -eq 1 ]]; then
- export LTTNG_HOME="$HOME"
- fi
+ export LTTNG_HOME="$HOME"
# Source Build uses DotNetCoreSdkDir variable
if [[ -n "${DotNetCoreSdkDir:-}" ]]; then
diff --git a/pack.sh b/pack.sh
index 2d86f53aa4ef..45ca5a62c7c8 100755
--- a/pack.sh
+++ b/pack.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-set -euo pipefail
+set -eo pipefail
configuration=Release
#arch=x64,arm,arm64
From f6d88adf6dd553e995ef8c82429931255dcdca00 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 20 Jul 2023 10:42:33 -0700
Subject: [PATCH 028/128] Generate packages.
refs VINYL-14964
---
pack.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pack.sh b/pack.sh
index 45ca5a62c7c8..8f0aadefa897 100755
--- a/pack.sh
+++ b/pack.sh
@@ -9,5 +9,5 @@ cat pack-list.txt | while read line || [[ -n $line ]];
do
echo $line
fullPath=$(pwd)/$(find . -iname "$line")
- ./eng/build.sh --configuration $configuration --projects $fullPath
+ ./eng/build.sh --pack --configuration $configuration --projects $fullPath
done
From 89afccabae3cb7fe570a5501fb46f97cc4294960 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 20 Jul 2023 12:04:49 -0700
Subject: [PATCH 029/128] Go back to the slow way of doing things.
Seg faults are happening when building everything within docker container.
refs VINYL-14964
---
dockerpack.sh | 4 +---
pack.sh | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dockerpack.sh b/dockerpack.sh
index 03298de73bd7..ef459ac57ab1 100755
--- a/dockerpack.sh
+++ b/dockerpack.sh
@@ -128,7 +128,6 @@ docker build "$(dirname "$dockerfile")" \
--tag $tagname \
-f "$dockerfile"
-# Vinyl: Added HOME variable as the teamcity linux build agent does not have a HOME folder by default.
docker run \
--rm \
-t \
@@ -146,9 +145,8 @@ docker run \
-e SYSTEM_TEAMFOUNDATIONCOLLECTIONURI \
-e DOTNET_CLI_TELEMETRY_OPTOUT \
-e Configuration \
- -e HOME="$DIR" \
-v "$DIR:$DIR" \
${docker_args[@]+"${docker_args[@]}"} \
$tagname \
- ./pack.sh \
+ ./eng/build.sh \
${build_args[@]+"${build_args[@]}"}
diff --git a/pack.sh b/pack.sh
index 8f0aadefa897..05b2e50dd6ca 100755
--- a/pack.sh
+++ b/pack.sh
@@ -9,5 +9,5 @@ cat pack-list.txt | while read line || [[ -n $line ]];
do
echo $line
fullPath=$(pwd)/$(find . -iname "$line")
- ./eng/build.sh --pack --configuration $configuration --projects $fullPath
+ ./dockerbuild.sh bionic --pack --configuration $configuration --projects $fullPath
done
From 6654e7db3803d201457556002a70b9449ab0567a Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Mon, 24 Jul 2023 14:11:24 -0700
Subject: [PATCH 030/128] Adding IIS and IISIntegration packages.
refs VINYL-14964
---
pack-list.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pack-list.txt b/pack-list.txt
index 63cc713bc3d6..2952febddd0c 100644
--- a/pack-list.txt
+++ b/pack-list.txt
@@ -24,6 +24,8 @@ Microsoft.AspNetCore.ResponseCompression.csproj
Microsoft.AspNetCore.Rewrite.csproj
Microsoft.AspNetCore.Routing.Abstractions.csproj
Microsoft.AspNetCore.Routing.csproj
+Microsoft.AspNetCore.Server.IIS.csproj
+Microsoft.AspNetCore.Server.IISIntegration.csproj
Microsoft.AspNetCore.Server.Kestrel.Core.csproj
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
From 80935a445a63b845f78e875049a1d44434af7dd3 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 2 Aug 2023 03:25:30 +0000
Subject: [PATCH 031/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 8 ++++++--
eng/Version.Details.xml | 28 ++++++++++++++--------------
eng/Versions.props | 14 +++++++-------
3 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 65bb92f0d5be..fe79bbc338d2 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,12 @@
-
+
+
+
@@ -25,10 +27,12 @@
+
+
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 8cf765e85742..470204c2a58c 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+ 5a218984448228027d0c5613fc49132e9eee7fe4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -245,33 +245,33 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+ 5a218984448228027d0c5613fc49132e9eee7fe4
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+ 5a218984448228027d0c5613fc49132e9eee7fe4
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+ 5a218984448228027d0c5613fc49132e9eee7fe4
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+ 5a218984448228027d0c5613fc49132e9eee7fe4
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+ 5a218984448228027d0c5613fc49132e9eee7fe4
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+ 5a218984448228027d0c5613fc49132e9eee7fe4
diff --git a/eng/Versions.props b/eng/Versions.props
index 9a77756a55fe..ca9d29c47357 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21-servicing.23363.11
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22-servicing.23401.9
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.21-servicing.23363.11
+ 6.0.22-servicing.23401.9
6.0.1
6.0.0
6.0.2
From 4a6bf8236763b0f4b245d9edcffd5c31e93d0810 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 2 Aug 2023 10:39:18 +0000
Subject: [PATCH 032/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index fe79bbc338d2..8c232bc6cb3a 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -32,7 +32,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 470204c2a58c..f49eb66e78e8 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5a218984448228027d0c5613fc49132e9eee7fe4
+ a51eda716136f8beccac9c063818aa536939af61
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5a218984448228027d0c5613fc49132e9eee7fe4
+ a51eda716136f8beccac9c063818aa536939af61
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5a218984448228027d0c5613fc49132e9eee7fe4
+ a51eda716136f8beccac9c063818aa536939af61
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5a218984448228027d0c5613fc49132e9eee7fe4
+ a51eda716136f8beccac9c063818aa536939af61
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5a218984448228027d0c5613fc49132e9eee7fe4
+ a51eda716136f8beccac9c063818aa536939af61
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5a218984448228027d0c5613fc49132e9eee7fe4
+ a51eda716136f8beccac9c063818aa536939af61
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5a218984448228027d0c5613fc49132e9eee7fe4
+ a51eda716136f8beccac9c063818aa536939af61
diff --git a/eng/Versions.props b/eng/Versions.props
index ca9d29c47357..75b4cccac11c 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.22
6.0.22
6.0.22
- 6.0.22-servicing.23401.9
+ 6.0.22-servicing.23401.20
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23401.9
+ 6.0.22-servicing.23401.20
6.0.1
6.0.0
6.0.2
From 45266f78484a55c1ff551eebad7f1618947bdd1e Mon Sep 17 00:00:00 2001
From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Date: Wed, 2 Aug 2023 11:10:31 -0700
Subject: [PATCH 033/128] Update branding to 6.0.22 (#49778)
---
eng/Versions.props | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index e3f38cdfb61a..a68d8be79ed6 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,8 +8,8 @@
6
0
- 21
- true
+ 22
+ false
From cdd11ebc404b9fab68679b3352e4acc473e3123d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 2 Aug 2023 18:48:38 +0000
Subject: [PATCH 034/128] [release/6.0] (deps): Bump src/submodules/googletest
(#49770)
Bumps [src/submodules/googletest](https://github.com/google/googletest) from `be03d00` to `6f6ab42`.
- [Release notes](https://github.com/google/googletest/releases)
- [Commits](https://github.com/google/googletest/compare/be03d00f5f0cc3a997d1a368bee8a1fe93651f48...6f6ab4212aa02cfe02e480711246da4fc17b0761)
---
updated-dependencies:
- dependency-name: src/submodules/googletest
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/submodules/googletest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/submodules/googletest b/src/submodules/googletest
index be03d00f5f0c..6f6ab4212aa0 160000
--- a/src/submodules/googletest
+++ b/src/submodules/googletest
@@ -1 +1 @@
-Subproject commit be03d00f5f0cc3a997d1a368bee8a1fe93651f48
+Subproject commit 6f6ab4212aa02cfe02e480711246da4fc17b0761
From 58d572af8d4b51da9669b5aa49d4b1f2cae64e33 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 2 Aug 2023 20:04:24 +0000
Subject: [PATCH 035/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore
---
NuGet.config | 8 ++------
eng/Version.Details.xml | 32 ++++++++++++++++----------------
eng/Versions.props | 16 ++++++++--------
3 files changed, 26 insertions(+), 30 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 8c232bc6cb3a..87d8756d060a 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,9 +7,7 @@
-
-
-
+
@@ -27,9 +25,7 @@
-
-
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index f49eb66e78e8..99c46abbcc93 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+ c62df6b705f70fd03d8ec8feba5ffddd93f35134
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index d3e691623ffa..5a3ca1d0f9b2 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.11
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22
+ 6.0.22
6.0.0-beta.23361.3
6.0.0-beta.23361.3
From 9dbd19b1421b22c49dfd2454f44e08af9c60d78a Mon Sep 17 00:00:00 2001
From: William Godbe
Date: Thu, 3 Aug 2023 13:23:38 -0700
Subject: [PATCH 036/128] Move to MacOS 13 (#49367)
---
eng/targets/Helix.Common.props | 2 +-
src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props
index ace38de8e19a..4b9a86cf4623 100644
--- a/eng/targets/Helix.Common.props
+++ b/eng/targets/Helix.Common.props
@@ -31,7 +31,7 @@
-
+
diff --git a/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs b/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs
index 30e791259528..18473c3a7b35 100644
--- a/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs
+++ b/src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs
@@ -17,7 +17,7 @@
namespace Microsoft.AspNetCore.Identity.Test
{
- [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/38542", Queues="OSX.1015.Amd64.Open;OSX.1015.Amd64")] //slow
+ [SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/38542", Queues="OSX.13.Amd64.Open;OSX.13.AMD64")] //slow
public class IdentityUIScriptsTest : IDisposable
{
private readonly ITestOutputHelper _output;
From 54ce6171d4eb8a54f9682abe91f3a61a0731f23a Mon Sep 17 00:00:00 2001
From: Brennan
Date: Mon, 7 Aug 2023 09:00:20 -0700
Subject: [PATCH 037/128] Update NuGet (#49872)
---
eng/Versions.props | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index a68d8be79ed6..d4e7768f2d2a 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -206,9 +206,9 @@
11.1.0
1.4.0
6.10.0
- 6.0.0
- 6.0.0
- 6.0.0
+ 6.0.5
+ 6.0.5
+ 6.0.5
5.0.0
5.0.0-alpha.20560.6
5.0.0
From 8df26a129f8cec3ac4afe429f14dc42955a4e73a Mon Sep 17 00:00:00 2001
From: wtgodbe
Date: Tue, 8 Aug 2023 11:00:08 -0700
Subject: [PATCH 038/128] Update baseline, SDK
---
eng/Baseline.Designer.props | 444 ++++++++++++++++++------------------
eng/Baseline.xml | 214 ++++++++---------
eng/Versions.props | 2 +-
global.json | 4 +-
4 files changed, 332 insertions(+), 332 deletions(-)
diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props
index ae468b57d8d0..e79ad5771518 100644
--- a/eng/Baseline.Designer.props
+++ b/eng/Baseline.Designer.props
@@ -2,28 +2,28 @@
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
-
-
+
+
+
@@ -34,120 +34,120 @@
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
-
+
+
- 6.0.20
+ 6.0.21
-
-
+
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
@@ -155,114 +155,114 @@
- 6.0.20
+ 6.0.21
-
+
-
+
-
+
- 6.0.20
+ 6.0.21
-
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
+
- 6.0.20
+ 6.0.21
-
-
+
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
-
+
+
- 6.0.20
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6.0.21
-
+
-
+
-
+
- 6.0.20
+ 6.0.21
-
+
-
+
-
+
- 6.0.20
+ 6.0.21
-
-
-
-
+
+
+
+
- 6.0.20
+ 6.0.21
@@ -688,69 +688,69 @@
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
+
- 6.0.20
+ 6.0.21
-
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
@@ -769,7 +769,7 @@
- 6.0.20
+ 6.0.21
@@ -788,7 +788,7 @@
- 6.0.20
+ 6.0.21
@@ -804,46 +804,46 @@
- 6.0.20
+ 6.0.21
-
+
-
+
-
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
-
-
+
+
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
@@ -853,7 +853,7 @@
- 6.0.20
+ 6.0.21
@@ -862,73 +862,73 @@
- 6.0.20
+ 6.0.21
-
+
-
+
-
+
- 6.0.20
+ 6.0.21
-
+
-
+
-
+
- 6.0.20
+ 6.0.21
-
+
-
+
-
+
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
@@ -957,11 +957,11 @@
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
@@ -979,13 +979,13 @@
- 6.0.20
+ 6.0.21
- 6.0.20
+ 6.0.21
-
+
\ No newline at end of file
diff --git a/eng/Baseline.xml b/eng/Baseline.xml
index 604ee1e588e2..bb265398da62 100644
--- a/eng/Baseline.xml
+++ b/eng/Baseline.xml
@@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele
Update this list when preparing for a new patch.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/Versions.props b/eng/Versions.props
index 364271f41f9d..087f57c1fc1c 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -9,7 +9,7 @@
6
0
22
- false
+ true
diff --git a/global.json b/global.json
index b96453f5621d..90b85c957751 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "6.0.120"
+ "version": "6.0.121"
},
"tools": {
- "dotnet": "6.0.120",
+ "dotnet": "6.0.121",
"runtimes": {
"dotnet/x64": [
"2.1.30",
From bb343895e35fda23d654b8e08f767a864a7eb717 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Tue, 8 Aug 2023 22:15:59 +0000
Subject: [PATCH 039/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 87d8756d060a..9ff4c44b8aa2 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 99c46abbcc93..78ff60f36111 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -11,35 +11,35 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- c62df6b705f70fd03d8ec8feba5ffddd93f35134
+ d5765348498c7e13cd8261bdab31b5d00636822b
https://github.com/dotnet/runtime
From 42af1fe8be1869b034feeec5aaefc0efb561564f Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Wed, 9 Aug 2023 16:54:49 +0000
Subject: [PATCH 040/128] Update dependencies from
https://github.com/dotnet/arcade build 20230808.5 (#49954)
[release/6.0] Update dependencies from dotnet/arcade
---
NuGet.config | 4 ----
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 4 ++--
global.json | 4 ++--
4 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 65bb92f0d5be..1e2458c409ad 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,8 @@
-
-
@@ -25,10 +23,8 @@
-
-
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 8cf765e85742..daa673a9468b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -280,22 +280,22 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
-
+
https://github.com/dotnet/arcade
- cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
+ 98fd22588fbb0f407faa6a74cb1aa79031306151
-
+
https://github.com/dotnet/arcade
- cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
+ 98fd22588fbb0f407faa6a74cb1aa79031306151
-
+
https://github.com/dotnet/arcade
- cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
+ 98fd22588fbb0f407faa6a74cb1aa79031306151
-
+
https://github.com/dotnet/arcade
- cd79d2e8f7844d0a9aca607d4d5b9b6ab78e2f34
+ 98fd22588fbb0f407faa6a74cb1aa79031306151
diff --git a/eng/Versions.props b/eng/Versions.props
index 087f57c1fc1c..8a33dbf1a7d0 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -131,8 +131,8 @@
6.0.21
6.0.21
- 6.0.0-beta.23361.3
- 6.0.0-beta.23361.3
+ 6.0.0-beta.23408.5
+ 6.0.0-beta.23408.5
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 5b06ab1e5888..1a70f5338b2d 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a51eda716136f8beccac9c063818aa536939af61
+ 8eab88d043e6baba9968ea618b28aa28afcf83b4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a51eda716136f8beccac9c063818aa536939af61
+ 8eab88d043e6baba9968ea618b28aa28afcf83b4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a51eda716136f8beccac9c063818aa536939af61
+ 8eab88d043e6baba9968ea618b28aa28afcf83b4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a51eda716136f8beccac9c063818aa536939af61
+ 8eab88d043e6baba9968ea618b28aa28afcf83b4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a51eda716136f8beccac9c063818aa536939af61
+ 8eab88d043e6baba9968ea618b28aa28afcf83b4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a51eda716136f8beccac9c063818aa536939af61
+ 8eab88d043e6baba9968ea618b28aa28afcf83b4
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- a51eda716136f8beccac9c063818aa536939af61
+ 8eab88d043e6baba9968ea618b28aa28afcf83b4
diff --git a/eng/Versions.props b/eng/Versions.props
index 1dd9ef7d0580..93beffa08a94 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.22
6.0.22
6.0.22
- 6.0.22-servicing.23401.20
+ 6.0.22-servicing.23410.5
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23401.20
+ 6.0.22-servicing.23410.5
6.0.1
6.0.0
6.0.2
From 4d6037c5c1e83478b32060a60ce97d9bd77a7054 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Sat, 12 Aug 2023 06:19:21 +0000
Subject: [PATCH 042/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 0d7443d4fb61..f003b00c28eb 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 1a70f5338b2d..4ced0b6af68b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8eab88d043e6baba9968ea618b28aa28afcf83b4
+ 8164fed1684d41a4a5bd32379fe05e632a530a16
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8eab88d043e6baba9968ea618b28aa28afcf83b4
+ 8164fed1684d41a4a5bd32379fe05e632a530a16
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8eab88d043e6baba9968ea618b28aa28afcf83b4
+ 8164fed1684d41a4a5bd32379fe05e632a530a16
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8eab88d043e6baba9968ea618b28aa28afcf83b4
+ 8164fed1684d41a4a5bd32379fe05e632a530a16
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8eab88d043e6baba9968ea618b28aa28afcf83b4
+ 8164fed1684d41a4a5bd32379fe05e632a530a16
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8eab88d043e6baba9968ea618b28aa28afcf83b4
+ 8164fed1684d41a4a5bd32379fe05e632a530a16
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8eab88d043e6baba9968ea618b28aa28afcf83b4
+ 8164fed1684d41a4a5bd32379fe05e632a530a16
diff --git a/eng/Versions.props b/eng/Versions.props
index 93beffa08a94..a5718db283c1 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.22
6.0.22
6.0.22
- 6.0.22-servicing.23410.5
+ 6.0.22-servicing.23411.16
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23410.5
+ 6.0.22-servicing.23411.16
6.0.1
6.0.0
6.0.2
From bb6c4d1d98a2a03a33f15b27a6e6872b7e0da93f Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Mon, 14 Aug 2023 12:15:20 -0700
Subject: [PATCH 043/128] Don't send telemetry during build.
This might help to fix a periodic crash.
VINYL-15000
---
pack.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pack.sh b/pack.sh
index 05b2e50dd6ca..0d561614c311 100755
--- a/pack.sh
+++ b/pack.sh
@@ -2,6 +2,8 @@
set -eo pipefail
+export DOTNET_CLI_TELEMETRY_OPTOUT="true"
+
configuration=Release
#arch=x64,arm,arm64
From 9c9233d0683fb061a75c9045153e8c6d3ec82027 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Mon, 14 Aug 2023 13:18:03 -0700
Subject: [PATCH 044/128] Remove MVC packages from build list.
refs VINYL-15008
---
pack-list.txt | 3 ---
1 file changed, 3 deletions(-)
diff --git a/pack-list.txt b/pack-list.txt
index 2952febddd0c..e7f058cd3128 100644
--- a/pack-list.txt
+++ b/pack-list.txt
@@ -49,7 +49,4 @@ Microsoft.AspNetCore.SignalR.Common.csproj
Microsoft.AspNetCore.SignalR.Core.csproj
Microsoft.AspNetCore.SignalR.csproj
Microsoft.AspNetCore.Websockets.csproj
-Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
-Microsoft.AspNetCore.Mvc.Abstractions.csproj
-Microsoft.AspNetCore.Mvc.Core.csproj
Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
\ No newline at end of file
From d64564a1514b5250cac0337fb0759c92cdaa23e6 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Tue, 15 Aug 2023 10:21:25 +0000
Subject: [PATCH 045/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index f003b00c28eb..9c526de6e200 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 4ced0b6af68b..7c0d3bbc5e68 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8164fed1684d41a4a5bd32379fe05e632a530a16
+ 0a9fee4daf8b2cf93643927a4d598a933fd04851
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8164fed1684d41a4a5bd32379fe05e632a530a16
+ 0a9fee4daf8b2cf93643927a4d598a933fd04851
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8164fed1684d41a4a5bd32379fe05e632a530a16
+ 0a9fee4daf8b2cf93643927a4d598a933fd04851
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8164fed1684d41a4a5bd32379fe05e632a530a16
+ 0a9fee4daf8b2cf93643927a4d598a933fd04851
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8164fed1684d41a4a5bd32379fe05e632a530a16
+ 0a9fee4daf8b2cf93643927a4d598a933fd04851
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8164fed1684d41a4a5bd32379fe05e632a530a16
+ 0a9fee4daf8b2cf93643927a4d598a933fd04851
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 8164fed1684d41a4a5bd32379fe05e632a530a16
+ 0a9fee4daf8b2cf93643927a4d598a933fd04851
diff --git a/eng/Versions.props b/eng/Versions.props
index a5718db283c1..375f0f1cddda 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.22
6.0.22
6.0.22
- 6.0.22-servicing.23411.16
+ 6.0.22-servicing.23414.22
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23411.16
+ 6.0.22-servicing.23414.22
6.0.1
6.0.0
6.0.2
From 2313cbb5c260e55f2236b46609014a697212c1c4 Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Tue, 15 Aug 2023 19:36:39 +0000
Subject: [PATCH 046/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20230815.3
Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport
From Version 6.0.22-servicing.23414.22 -> To Version 6.0.22-servicing.23415.3
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 9c526de6e200..3cf86380cd58 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 7c0d3bbc5e68..cac926eb038d 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0a9fee4daf8b2cf93643927a4d598a933fd04851
+ 683c57982ac41cf4beead6fef7f03e86a111dd3c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0a9fee4daf8b2cf93643927a4d598a933fd04851
+ 683c57982ac41cf4beead6fef7f03e86a111dd3c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0a9fee4daf8b2cf93643927a4d598a933fd04851
+ 683c57982ac41cf4beead6fef7f03e86a111dd3c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0a9fee4daf8b2cf93643927a4d598a933fd04851
+ 683c57982ac41cf4beead6fef7f03e86a111dd3c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0a9fee4daf8b2cf93643927a4d598a933fd04851
+ 683c57982ac41cf4beead6fef7f03e86a111dd3c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0a9fee4daf8b2cf93643927a4d598a933fd04851
+ 683c57982ac41cf4beead6fef7f03e86a111dd3c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 0a9fee4daf8b2cf93643927a4d598a933fd04851
+ 683c57982ac41cf4beead6fef7f03e86a111dd3c
diff --git a/eng/Versions.props b/eng/Versions.props
index 375f0f1cddda..54b030f3b927 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.22
6.0.22
6.0.22
- 6.0.22-servicing.23414.22
+ 6.0.22-servicing.23415.3
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23414.22
+ 6.0.22-servicing.23415.3
6.0.1
6.0.0
6.0.2
From 973557760847bcb6309ce3f79ce503f38a04cdff Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Tue, 15 Aug 2023 22:17:58 +0000
Subject: [PATCH 047/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20230809.7
dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools
From Version 6.0.22 -> To Version 6.0.22
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 3cf86380cd58..4a5b5ed0dc7c 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index cac926eb038d..434ad4ffe8de 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -11,35 +11,35 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- d5765348498c7e13cd8261bdab31b5d00636822b
+ 687fc8f9a538592b2b1494f6353293aac5da74a5
https://github.com/dotnet/runtime
From f9a977fa26e4ba036bc74a60797b1de3a6e3ed07 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 16 Aug 2023 02:41:19 +0000
Subject: [PATCH 048/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 4a5b5ed0dc7c..bb141a01de8f 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 434ad4ffe8de..8908adae4e81 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 683c57982ac41cf4beead6fef7f03e86a111dd3c
+ ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 683c57982ac41cf4beead6fef7f03e86a111dd3c
+ ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 683c57982ac41cf4beead6fef7f03e86a111dd3c
+ ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 683c57982ac41cf4beead6fef7f03e86a111dd3c
+ ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 683c57982ac41cf4beead6fef7f03e86a111dd3c
+ ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 683c57982ac41cf4beead6fef7f03e86a111dd3c
+ ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 683c57982ac41cf4beead6fef7f03e86a111dd3c
+ ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
diff --git a/eng/Versions.props b/eng/Versions.props
index 54b030f3b927..4d9d04a07475 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.22
6.0.22
6.0.22
- 6.0.22-servicing.23415.3
+ 6.0.22-servicing.23415.11
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23415.3
+ 6.0.22-servicing.23415.11
6.0.1
6.0.0
6.0.2
From cec8e699eac837c5cc692569da537ca17dc85f14 Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Fri, 25 Aug 2023 05:25:30 +0000
Subject: [PATCH 049/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20230824.25
Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport
From Version 6.0.22-servicing.23415.11 -> To Version 6.0.22-servicing.23424.25
---
NuGet.config | 6 ++++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index bb141a01de8f..9fede3245833 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,11 @@
-
+
+
@@ -25,10 +26,11 @@
+
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 8908adae4e81..66cdb6dd76f1 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
+ 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
+ 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
+ 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
+ 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
+ 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
+ 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- ad40cc35b59e63e9e5dae830d8cd10ddcd41eddf
+ 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
diff --git a/eng/Versions.props b/eng/Versions.props
index 4d9d04a07475..04c46827f4d4 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.22
6.0.22
6.0.22
- 6.0.22-servicing.23415.11
+ 6.0.22-servicing.23424.25
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23415.11
+ 6.0.22-servicing.23424.25
6.0.1
6.0.0
6.0.2
From 9329a3a89fe5352914c5665721d7d82111217aa3 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Wed, 30 Aug 2023 09:12:55 -0700
Subject: [PATCH 050/128] Add razor to list of packages being generated.
refs VINYL-15123
---
pack-list.txt | 3 +++
pack.sh.txt | 5 +++++
.../src/Microsoft.AspNetCore.Html.Abstractions.csproj | 2 +-
.../src/Microsoft.AspNetCore.Razor.Runtime.csproj | 2 +-
src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj | 2 +-
5 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/pack-list.txt b/pack-list.txt
index e7f058cd3128..2c2fe42bef72 100644
--- a/pack-list.txt
+++ b/pack-list.txt
@@ -11,6 +11,7 @@ Microsoft.AspNetCore.HostFiltering.csproj
Microsoft.AspNetCore.Hosting.Abstractions.csproj
Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
Microsoft.AspNetCore.Hosting.csproj
+Microsoft.AspNetCore.Html.Abstractions.csproj
Microsoft.AspNetCore.Http.Abstractions.csproj
Microsoft.AspNetCore.Http.Extensions.csproj
Microsoft.AspNetCore.Http.Features.csproj
@@ -20,6 +21,8 @@ Microsoft.AspNetCore.HttpOverrides.csproj
Microsoft.AspNetCore.Localization.csproj
Microsoft.AspNetCore.Owin.csproj
Microsoft.AspNetCore.Metadata.csproj
+Microsoft.AspNetCore.Razor.csproj
+Microsoft.AspNetCore.Razor.Runtime.csproj
Microsoft.AspNetCore.ResponseCompression.csproj
Microsoft.AspNetCore.Rewrite.csproj
Microsoft.AspNetCore.Routing.Abstractions.csproj
diff --git a/pack.sh.txt b/pack.sh.txt
index 80ca2329acd6..014ae85a6294 100644
--- a/pack.sh.txt
+++ b/pack.sh.txt
@@ -62,3 +62,8 @@ dotnet pack **/Microsoft.Extensions.FileProviders.Embedded.csproj
dotnet pack **/Microsoft.Extensions.ObjectPool.csproj
dotnet pack **/Microsoft.Extensions.WebEncoders.csproj
dotnet pack **/Microsoft.Net.Http.Headers.csproj
+
+# razor
+dotnet pack **/Microsoft.AspNetCore.Html.Abstractions.csproj
+dotnet pack **/Microsoft.AspNetCore.Razor.csproj
+dotnet pack **/Microsoft.AspNetCore.Razor.Runtime.csproj
diff --git a/src/Html.Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj b/src/Html.Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj
index 9f3710febf4c..c93a8a505a0f 100644
--- a/src/Html.Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj
+++ b/src/Html.Abstractions/src/Microsoft.AspNetCore.Html.Abstractions.csproj
@@ -10,7 +10,7 @@ Microsoft.AspNetCore.Html.IHtmlContent
true
true
aspnetcore
- false
+ true
enable
diff --git a/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj b/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj
index 8b9cdb9c3ac8..c5af008f18af 100644
--- a/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj
+++ b/src/Razor/Razor.Runtime/src/Microsoft.AspNetCore.Razor.Runtime.csproj
@@ -6,7 +6,7 @@
true
true
$(PackageTags);taghelper;taghelpers
- false
+ true
diff --git a/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj b/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj
index 482bcbeeaef8..edc1bb24f374 100644
--- a/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj
+++ b/src/Razor/Razor/src/Microsoft.AspNetCore.Razor.csproj
@@ -13,7 +13,7 @@ Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper
true
$(PackageTags);taghelper;taghelpers
$(NoWarn);CS1591
- false
+ true
true
From d263f99f4409afe3dc487d136e332aa474102db7 Mon Sep 17 00:00:00 2001
From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Date: Thu, 31 Aug 2023 13:17:44 -0700
Subject: [PATCH 051/128] Update branding to 6.0.23 (#50461)
---
eng/Versions.props | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 8a33dbf1a7d0..c08c43481bca 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,8 +8,8 @@
6
0
- 22
- true
+ 23
+ false
From ba041f0169f2af7a24ae24e96404fdc8466cf60d Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Thu, 31 Aug 2023 22:50:05 +0000
Subject: [PATCH 052/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore
---
NuGet.config | 10 ++++++----
eng/Version.Details.xml | 32 ++++++++++++++++----------------
eng/Versions.props | 16 ++++++++--------
3 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 9fede3245833..155a4143b5a1 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -5,10 +5,11 @@
+
+
-
-
+
@@ -26,10 +27,11 @@
-
-
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 66cdb6dd76f1..a82242af5eed 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 687fc8f9a538592b2b1494f6353293aac5da74a5
+ a0b8ded285e2233a70b77c9a74b0ad32e1340739
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index aab6fc8d22e9..bbab51a7e2bf 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.11
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
6.0.0-beta.23408.5
6.0.0-beta.23408.5
From 4423a46856873cf9baa5fe95d9c6baa1a3fb7aca Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Fri, 1 Sep 2023 04:49:22 +0000
Subject: [PATCH 053/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 8 ++------
eng/Version.Details.xml | 28 ++++++++++++++--------------
eng/Versions.props | 14 +++++++-------
3 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 155a4143b5a1..8c2ffd2b1364 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,9 +4,7 @@
-
-
-
+
@@ -30,9 +28,7 @@
-
-
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index a82242af5eed..0fba7d464833 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
+ 211b7ecbebe2576cbbbc205a3658361441018b61
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -245,33 +245,33 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
+ 211b7ecbebe2576cbbbc205a3658361441018b61
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
+ 211b7ecbebe2576cbbbc205a3658361441018b61
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
+ 211b7ecbebe2576cbbbc205a3658361441018b61
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
+ 211b7ecbebe2576cbbbc205a3658361441018b61
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
+ 211b7ecbebe2576cbbbc205a3658361441018b61
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 4bb6dc195c0a3bc4c7e24ff54a8925b98db4fecd
+ 211b7ecbebe2576cbbbc205a3658361441018b61
diff --git a/eng/Versions.props b/eng/Versions.props
index bbab51a7e2bf..4a6672b69a0a 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22
- 6.0.22-servicing.23424.25
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23-servicing.23431.21
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.22-servicing.23424.25
+ 6.0.23-servicing.23431.21
6.0.1
6.0.0
6.0.2
From 8ec91862893d2b5422c399582d99961bee252335 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 1 Sep 2023 09:12:22 -0700
Subject: [PATCH 054/128] [release/6.0] (deps): Bump src/submodules/googletest
(#50475)
Bumps [src/submodules/googletest](https://github.com/google/googletest) from `6f6ab42` to `8a6feab`.
- [Release notes](https://github.com/google/googletest/releases)
- [Commits](https://github.com/google/googletest/compare/6f6ab4212aa02cfe02e480711246da4fc17b0761...8a6feabf04bec8fb125e0df0ad1195c42350725f)
---
updated-dependencies:
- dependency-name: src/submodules/googletest
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/submodules/googletest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/submodules/googletest b/src/submodules/googletest
index 6f6ab4212aa0..8a6feabf04be 160000
--- a/src/submodules/googletest
+++ b/src/submodules/googletest
@@ -1 +1 @@
-Subproject commit 6f6ab4212aa02cfe02e480711246da4fc17b0761
+Subproject commit 8a6feabf04bec8fb125e0df0ad1195c42350725f
From bc60047c33de2e6d534151b8c41be077f53417ab Mon Sep 17 00:00:00 2001
From: Nolan Glore
Date: Fri, 1 Sep 2023 09:27:14 -0700
Subject: [PATCH 055/128] Fixup pRequestInfo after GCs (#50447)
---
src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs b/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs
index 51e734bf504a..c4475d5eb5a5 100644
--- a/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs
+++ b/src/Shared/HttpSys/RequestProcessing/NativeRequestContext.cs
@@ -553,9 +553,12 @@ private IReadOnlyDictionary> GetRequestInfo(IntPtr bas
var info = new Dictionary>(count);
+ long fixup = (byte*)nativeRequest - (byte*)baseAddress;
+ var pRequestInfo = (HttpApiTypes.HTTP_REQUEST_INFO*)((byte*)nativeRequest->pRequestInfo + fixup);
+
for (var i = 0; i < count; i++)
{
- var requestInfo = nativeRequest->pRequestInfo[i];
+ var requestInfo = pRequestInfo[i];
var offset = (long)requestInfo.pInfo - (long)baseAddress;
info.Add(
(int)requestInfo.InfoType,
From 529ed6b7ea2f4a27e5fef3044868d5b359a3e953 Mon Sep 17 00:00:00 2001
From: Mackinnon Buck
Date: Wed, 6 Sep 2023 10:40:25 -0700
Subject: [PATCH 056/128] Update jquery-validation to v1.19.5 (#50484)
---
.../Pages/V4/_ValidationScriptsPartial.cshtml | 4 +-
.../Pages/V5/_ValidationScriptsPartial.cshtml | 4 +-
src/Identity/UI/src/THIRD-PARTY-NOTICES.txt | 2 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../Shared/_ValidationScriptsPartial.cshtml | 2 +-
.../Shared/_ValidationScriptsPartial.cshtml | 2 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
src/ProjectTemplates/THIRD-PARTY-NOTICES | 2 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../samples/ClaimsTransformation/bower.json | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 16 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
.../wwwroot/lib/jquery/.bower.json | 2 +-
.../wwwroot/lib/jquery/dist/jquery.min.map | 2 +-
src/Security/samples/Cookies/bower.json | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 16 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
.../Cookies/wwwroot/lib/jquery/.bower.json | 2 +-
.../wwwroot/lib/jquery/dist/jquery.min.map | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 19 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../wwwroot/lib/jquery-validation/.bower.json | 19 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../samples/PathSchemeSelection/bower.json | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 16 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
.../wwwroot/lib/jquery/.bower.json | 2 +-
.../wwwroot/lib/jquery/dist/jquery.min.map | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 19 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
65 files changed, 11695 insertions(+), 4546 deletions(-)
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml
index 74ca36266548..a67a209cbe94 100644
--- a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml
+++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml
@@ -3,11 +3,11 @@
-
-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml
index 6cd4eed86820..da4aebe98a86 100644
--- a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml
+++ b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml
@@ -1,2 +1,2 @@
-
+
diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFE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);
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/ProjectTemplates/THIRD-PARTY-NOTICES b/src/ProjectTemplates/THIRD-PARTY-NOTICES
index 40f4f3076988..d02758db71c9 100644
--- a/src/ProjectTemplates/THIRD-PARTY-NOTICES
+++ b/src/ProjectTemplates/THIRD-PARTY-NOTICES
@@ -168,7 +168,7 @@ externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.
-License notice for jQuery Validation v1.17.0
+License notice for jQuery Validation v1.19.5
--------------------------------------------
The MIT License (MIT)
=====================
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/bower.json b/src/Security/samples/ClaimsTransformation/bower.json
index bf55590ec5a4..c5d338ecc3db 100644
--- a/src/Security/samples/ClaimsTransformation/bower.json
+++ b/src/Security/samples/ClaimsTransformation/bower.json
@@ -4,7 +4,7 @@
"dependencies": {
"bootstrap": "3.4.0",
"jquery": "3.5.1",
- "jquery-validation": "1.14.0",
+ "jquery-validation": "1.19.5",
"jquery-validation-unobtrusive": "3.2.6"
}
}
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..e842c332996a 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,14 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
"_originalSource": "jquery-validation"
}
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-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]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json
index e3218a820ef1..711216051c4d 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json
@@ -22,4 +22,4 @@
"_source": "git://github.com/jquery/jquery-dist.git",
"_target": "3.5.1",
"_originalSource": "jquery"
-}
\ No newline at end of file
+}
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map
index cbe1012155ca..9a4ee2f9cc81 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map
@@ -1 +1 @@
-{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAAOL,EAAIK,KAAO,SAAUC,GAC/B,OAAON,EAAIK,KAAKE,KAAMD,IACnB,SAAUA,GACb,OAAON,EAAIQ,OAAOC,MAAO,GAAIH,IAI1BI,EAAOV,EAAIU,KAEXC,EAAUX,EAAIW,QAEdC,EAAa,GAEbC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,EAAuBD,EAAWT,KAAML,QAExCgB,EAAU,GAEVC,EAAa,SAAqBC,GAMhC,MAAsB,mBAARA,GAA8C,iBAAjBA,EAAIC,UAIjDC,EAAW,SAAmBF,GAChC,OAAc,MAAPA,GAAeA,IAAQA,EAAIvB,QAIhCH,EAAWG,EAAOH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,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
\ No newline at end of file
+{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL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AKC,MACxBlgB,EAAOqJ,SAAWA,EAClBrJ,EAAO1B,WAAaA,EACpB0B,EAAOvB,SAAWA,EAClBuB,EAAOgf,UAAYA,EACnBhf,EAAOrB,KAAOmB,EAEdE,EAAOqpB,IAAM3jB,KAAK2jB,IAElBrpB,EAAOipC,UAAY,SAAU1qC,GAK5B,IAAII,EAAOqB,EAAOrB,KAAMJ,GACxB,OAAkB,WAATI,GAA8B,WAATA,KAK5BuqC,MAAO3qC,EAAM0xB,WAAY1xB,KAG5ByB,EAAOmpC,KAAO,SAAU5pC,GACvB,OAAe,MAARA,EACN,IACEA,EAAO,IAAK2D,QAAS8D,GAAO,KAkBT,mBAAXoiC,QAAyBA,OAAOC,KAC3CD,OAAQ,SAAU,GAAI,WACrB,OAAOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
diff --git a/src/Security/samples/Cookies/bower.json b/src/Security/samples/Cookies/bower.json
index bf55590ec5a4..c5d338ecc3db 100644
--- a/src/Security/samples/Cookies/bower.json
+++ b/src/Security/samples/Cookies/bower.json
@@ -4,7 +4,7 @@
"dependencies": {
"bootstrap": "3.4.0",
"jquery": "3.5.1",
- "jquery-validation": "1.14.0",
+ "jquery-validation": "1.19.5",
"jquery-validation-unobtrusive": "3.2.6"
}
}
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..e842c332996a 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,14 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
"_originalSource": "jquery-validation"
}
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]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5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json b/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json
index e3218a820ef1..711216051c4d 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json
@@ -22,4 +22,4 @@
"_source": "git://github.com/jquery/jquery-dist.git",
"_target": "3.5.1",
"_originalSource": "jquery"
-}
\ No newline at end of file
+}
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map b/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map
index cbe1012155ca..9a4ee2f9cc81 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map
@@ -1 +1 @@
-{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAAOL,EAAIK,KAAO,SAAUC,GAC/B,OAAON,EAAIK,KAAKE,KAAMD,IACnB,SAAUA,GACb,OAAON,EAAIQ,OAAOC,MAAO,GAAIH,IAI1BI,EAAOV,EAAIU,KAEXC,EAAUX,EAAIW,QAEdC,EAAa,GAEbC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,EAAuBD,EAAWT,KAAML,QAExCgB,EAAU,GAEVC,EAAa,SAAqBC,GAMhC,MAAsB,mBAARA,GAA8C,iBAAjBA,EAAIC,UAIjDC,EAAW,SAAmBF,GACh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wsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
\ No newline at end of file
+{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SA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GhB5X,EAAO6C,QAAUD,MAAMC,QACvB7C,EAAOgpC,UAAY/oB,KAAKC,MACxBlgB,EAAOqJ,SAAWA,EAClBrJ,EAAO1B,WAAaA,EACpB0B,EAAOvB,SAAWA,EAClBuB,EAAOgf,UAAYA,EACnBhf,EAAOrB,KAAOmB,EAEdE,EAAOqpB,IAAM3jB,KAAK2jB,IAElBrpB,EAAOipC,UAAY,SAAU1qC,GAK5B,IAAII,EAAOqB,EAAOrB,KAAMJ,GACxB,OAAkB,WAATI,GAA8B,WAATA,KAK5BuqC,MAAO3qC,EAAM0xB,WAAY1xB,KAG5ByB,EAAOmpC,KAAO,SAAU5pC,GACvB,OAAe,MAARA,EACN,IACEA,EAAO,IAAK2D,QAAS8D,GAAO,KAkBT,mBAAXoiC,QAAyBA,OAAOC,KAC3CD,OAAQ,SAAU,GAAI,WACrB,OAAOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
diff --git a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..4c51b65cfe56 100644
--- a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,15 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
- "_originalSource": "jquery-validation"
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
+ "_originalSource": "jquery-validation",
+ "_direct": true
}
\ No newline at end of file
diff --git a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js
index 4e979bcf67fd..cd0442eb98af 100644
--- a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js
+++ b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js
@@ -1,24 +1,27 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-$.extend($.fn, {
- // http://jqueryvalidation.org/validate/
+$.extend( $.fn, {
+
+ // https://jqueryvalidation.org/validate/
validate: function( options ) {
- // if nothing is selected, return nothing; can't chain anyway
+ // If nothing is selected, return nothing; can't chain anyway
if ( !this.length ) {
if ( options && options.debug && window.console ) {
console.warn( "Nothing selected, can't validate, returning nothing." );
@@ -26,7 +29,7 @@ $.extend($.fn, {
return;
}
- // check if a validator for this form was already created
+ // Check if a validator for this form was already created
var validator = $.data( this[ 0 ], "validator" );
if ( validator ) {
return validator;
@@ -41,40 +44,50 @@ $.extend($.fn, {
if ( validator.settings.onsubmit ) {
this.on( "click.validate", ":submit", function( event ) {
- if ( validator.settings.submitHandler ) {
- validator.submitButton = event.target;
- }
- // allow suppressing validation by adding a cancel class to the submit button
+ // Track the used submit button to properly handle scripted
+ // submits later.
+ validator.submitButton = event.currentTarget;
+
+ // Allow suppressing validation by adding a cancel class to the submit button
if ( $( this ).hasClass( "cancel" ) ) {
validator.cancelSubmit = true;
}
- // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
if ( $( this ).attr( "formnovalidate" ) !== undefined ) {
validator.cancelSubmit = true;
}
- });
+ } );
- // validate the form on submit
+ // Validate the form on submit
this.on( "submit.validate", function( event ) {
if ( validator.settings.debug ) {
- // prevent form submit to be able to see console output
+
+ // Prevent form submit to be able to see console output
event.preventDefault();
}
+
function handle() {
var hidden, result;
- if ( validator.settings.submitHandler ) {
- if ( validator.submitButton ) {
- // insert a hidden input as a replacement for the missing submit button
- hidden = $( "" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..4c51b65cfe56 100644
--- a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,15 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
- "_originalSource": "jquery-validation"
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
+ "_originalSource": "jquery-validation",
+ "_direct": true
}
\ No newline at end of file
diff --git a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js
index 4e979bcf67fd..cd0442eb98af 100644
--- a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js
+++ b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js
@@ -1,24 +1,27 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-$.extend($.fn, {
- // http://jqueryvalidation.org/validate/
+$.extend( $.fn, {
+
+ // https://jqueryvalidation.org/validate/
validate: function( options ) {
- // if nothing is selected, return nothing; can't chain anyway
+ // If nothing is selected, return nothing; can't chain anyway
if ( !this.length ) {
if ( options && options.debug && window.console ) {
console.warn( "Nothing selected, can't validate, returning nothing." );
@@ -26,7 +29,7 @@ $.extend($.fn, {
return;
}
- // check if a validator for this form was already created
+ // Check if a validator for this form was already created
var validator = $.data( this[ 0 ], "validator" );
if ( validator ) {
return validator;
@@ -41,40 +44,50 @@ $.extend($.fn, {
if ( validator.settings.onsubmit ) {
this.on( "click.validate", ":submit", function( event ) {
- if ( validator.settings.submitHandler ) {
- validator.submitButton = event.target;
- }
- // allow suppressing validation by adding a cancel class to the submit button
+ // Track the used submit button to properly handle scripted
+ // submits later.
+ validator.submitButton = event.currentTarget;
+
+ // Allow suppressing validation by adding a cancel class to the submit button
if ( $( this ).hasClass( "cancel" ) ) {
validator.cancelSubmit = true;
}
- // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
if ( $( this ).attr( "formnovalidate" ) !== undefined ) {
validator.cancelSubmit = true;
}
- });
+ } );
- // validate the form on submit
+ // Validate the form on submit
this.on( "submit.validate", function( event ) {
if ( validator.settings.debug ) {
- // prevent form submit to be able to see console output
+
+ // Prevent form submit to be able to see console output
event.preventDefault();
}
+
function handle() {
var hidden, result;
- if ( validator.settings.submitHandler ) {
- if ( validator.submitButton ) {
- // insert a hidden input as a replacement for the missing submit button
- hidden = $( "" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/bower.json b/src/Security/samples/PathSchemeSelection/bower.json
index bf55590ec5a4..c5d338ecc3db 100644
--- a/src/Security/samples/PathSchemeSelection/bower.json
+++ b/src/Security/samples/PathSchemeSelection/bower.json
@@ -4,7 +4,7 @@
"dependencies": {
"bootstrap": "3.4.0",
"jquery": "3.5.1",
- "jquery-validation": "1.14.0",
+ "jquery-validation": "1.19.5",
"jquery-validation-unobtrusive": "3.2.6"
}
}
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..e842c332996a 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,14 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
"_originalSource": "jquery-validation"
}
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json
index e3218a820ef1..711216051c4d 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json
@@ -22,4 +22,4 @@
"_source": "git://github.com/jquery/jquery-dist.git",
"_target": "3.5.1",
"_originalSource": "jquery"
-}
\ No newline at end of file
+}
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map
index cbe1012155ca..9a4ee2f9cc81 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map
@@ -1 +1 @@
-{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAAOL,EAAIK,KAAO,SAAUC,GAC/B,OAAON,EAAIK,KAAKE,KAAMD,IACnB,SAAUA,GACb,OAAON,EAAIQ,OAAOC,MAAO,GAAIH,IAI1BI,EAAOV,EAAIU,KAEXC,EAAUX,EAAIW,QAEdC,EAAa,GAEbC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,EAAuBD,EAAWT,KAAML,QAExCgB,EAAU,GAEVC,EAAa,SAAqBC,GAMhC,MAAsB,mBAARA,GAA8C,iBAAjBA,EAAIC,UAIjDC,EAAW,SAAmBF,GAChC,OAAc,MAAPA,GAAeA,IAAQA,EAAIvB,QAIhCH,EAAWG,EAAOH,SAIjB6B,EAA4B,CAC/BC,MAAM,EACNC,KAAK,EACLC,OAAO,EACPC,UAAU,GAGX,SAASC,EAASC,EAAMC,EAAMC,GAG7B,IAAIC,EAAGC,EACNC,GAHDH,EAAMA,GAA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AAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
\ No newline at end of file
+{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EA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IAAM3jB,KAAK2jB,IAElBrpB,EAAOipC,UAAY,SAAU1qC,GAK5B,IAAII,EAAOqB,EAAOrB,KAAMJ,GACxB,OAAkB,WAATI,GAA8B,WAATA,KAK5BuqC,MAAO3qC,EAAM0xB,WAAY1xB,KAG5ByB,EAAOmpC,KAAO,SAAU5pC,GACvB,OAAe,MAARA,EACN,IACEA,EAAO,IAAK2D,QAAS8D,GAAO,KAkBT,mBAAXoiC,QAAyBA,OAAOC,KAC3CD,OAAQ,SAAU,GAAI,WACrB,OAAOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..4c51b65cfe56 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,15 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
- "_originalSource": "jquery-validation"
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
+ "_originalSource": "jquery-validation",
+ "_direct": true
}
\ No newline at end of file
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
From 9ec7bd0ebb9dbd8e250e2f1a342758a575d63da1 Mon Sep 17 00:00:00 2001
From: Steve Sanderson
Date: Wed, 6 Sep 2023 19:12:21 +0000
Subject: [PATCH 057/128] Prevent submission of EditForm after disposal
Prevent submission of EditForm after disposal
---
.../Components/src/ComponentBase.cs | 3 ++
src/Components/Components/src/RenderHandle.cs | 3 ++
.../Components/src/RenderTree/Renderer.cs | 4 +++
src/Components/Web/src/Forms/EditForm.cs | 6 ++++
.../test/E2ETest/Tests/FormsTest.cs | 33 +++++++++++++++++++
.../FormsTest/SimpleValidationComponent.razor | 12 +++++++
6 files changed, 61 insertions(+)
diff --git a/src/Components/Components/src/ComponentBase.cs b/src/Components/Components/src/ComponentBase.cs
index 90f2e01b5724..388b3005e54b 100644
--- a/src/Components/Components/src/ComponentBase.cs
+++ b/src/Components/Components/src/ComponentBase.cs
@@ -329,5 +329,8 @@ Task IHandleAfterRender.OnAfterRenderAsync()
// have to use "async void" and do their own exception handling in
// the case where they want to start an async task.
}
+
+ // Exists for 6.0/7.0 patch only. A different solution is used from .NET 8 onwards.
+ internal bool IsComponentDisposed() => _renderHandle.IsComponentDisposed();
}
}
diff --git a/src/Components/Components/src/RenderHandle.cs b/src/Components/Components/src/RenderHandle.cs
index e7923ce41d0b..c92c14033068 100644
--- a/src/Components/Components/src/RenderHandle.cs
+++ b/src/Components/Components/src/RenderHandle.cs
@@ -52,6 +52,9 @@ public Dispatcher Dispatcher
internal bool IsRendererDisposed => _renderer?.Disposed
?? throw new InvalidOperationException("No renderer has been initialized.");
+ // Exists for 6.0/7.0 patch only. A different solution is used from .NET 8 onwards.
+ internal bool IsComponentDisposed() => _renderer?.IsComponentDisposed(_componentId) ?? false;
+
///
/// Notifies the renderer that the component should be rendered.
///
diff --git a/src/Components/Components/src/RenderTree/Renderer.cs b/src/Components/Components/src/RenderTree/Renderer.cs
index ed3bc5951b65..d72a8ae0e503 100644
--- a/src/Components/Components/src/RenderTree/Renderer.cs
+++ b/src/Components/Components/src/RenderTree/Renderer.cs
@@ -1114,5 +1114,9 @@ public async ValueTask DisposeAsync()
}
}
}
+
+ // Exists for 6.0/7.0 patch only. A different solution is used from .NET 8 onwards.
+ internal bool IsComponentDisposed(int componentId)
+ => !_componentStateById.ContainsKey(componentId);
}
}
diff --git a/src/Components/Web/src/Forms/EditForm.cs b/src/Components/Web/src/Forms/EditForm.cs
index 72d4227c3e3b..44c24eadef9a 100644
--- a/src/Components/Web/src/Forms/EditForm.cs
+++ b/src/Components/Web/src/Forms/EditForm.cs
@@ -139,6 +139,12 @@ private async Task HandleSubmitAsync()
{
Debug.Assert(_editContext != null);
+ // Exists for 6.0/7.0 patch only. A different solution is used from .NET 8 onwards.
+ if (IsComponentDisposed())
+ {
+ return;
+ }
+
if (OnSubmit.HasDelegate)
{
// When using OnSubmit, the developer takes control of the validation lifecycle
diff --git a/src/Components/test/E2ETest/Tests/FormsTest.cs b/src/Components/test/E2ETest/Tests/FormsTest.cs
index 1d4b0a907aae..fb3ae155f6cb 100644
--- a/src/Components/test/E2ETest/Tests/FormsTest.cs
+++ b/src/Components/test/E2ETest/Tests/FormsTest.cs
@@ -929,6 +929,39 @@ public void InputRangeAttributeOrderDoesNotAffectValue()
Browser.Equal("210", () => rangeWithValueLast.GetDomProperty("value"));
}
+ [Fact]
+ public async Task CannotSubmitEditFormSynchronouslyAfterItWasRemoved()
+ {
+ var appElement = MountSimpleValidationComponent();
+
+ var submitButtonFinder = By.CssSelector("button[type=submit]");
+ Browser.Exists(submitButtonFinder);
+
+ // Remove the form then immediately also submit it, so the server receives both
+ // the 'remove' and 'submit' commands (in that order) before it updates the UI
+ appElement.FindElement(By.Id("remove-form")).Click();
+
+ try
+ {
+ appElement.FindElement(submitButtonFinder).Click();
+ }
+ catch (NoSuchElementException)
+ {
+ // This should happen on WebAssembly because the form will be removed synchronously
+ // That means the test has passed
+ return;
+ }
+
+ // Wait for the removal to complete, which is intentionally delayed to ensure
+ // this test can submit a second instruction before the first is processed. Then
+ // wait a bit more to be really sure the second instruction was processed.
+ Browser.DoesNotExist(submitButtonFinder);
+ await Task.Delay(1000);
+
+ // Verify that the form submit event was not processed
+ Browser.DoesNotExist(By.Id("last-callback"));
+ }
+
private Func CreateValidationMessagesAccessor(IWebElement appElement)
{
return () => appElement.FindElements(By.ClassName("validation-message"))
diff --git a/src/Components/test/testassets/BasicTestApp/FormsTest/SimpleValidationComponent.razor b/src/Components/test/testassets/BasicTestApp/FormsTest/SimpleValidationComponent.razor
index 8bceb63f5b71..0428e7baa1d1 100644
--- a/src/Components/test/testassets/BasicTestApp/FormsTest/SimpleValidationComponent.razor
+++ b/src/Components/test/testassets/BasicTestApp/FormsTest/SimpleValidationComponent.razor
@@ -1,6 +1,8 @@
@using System.ComponentModel.DataAnnotations
@using Microsoft.AspNetCore.Components.Forms
+@if (!removeForm)
+{
@@ -22,16 +24,20 @@
+}
@if (lastCallback != null)
{
@lastCallback
}
+
+
@code {
protected virtual bool UseExperimentalValidator => false;
string lastCallback;
+ bool removeForm;
[Required(ErrorMessage = "Please choose a username")]
public string UserName { get; set; }
@@ -49,4 +55,10 @@
{
lastCallback = "OnInvalidSubmit";
}
+
+ void RemoveForm()
+ {
+ removeForm = true;
+ Thread.Sleep(1000); // To ensure we can dispatch another event before this completes
+ }
}
From 7d43a8866f38024aef0a7e0a02118fc286f7c193 Mon Sep 17 00:00:00 2001
From: wtgodbe
Date: Tue, 12 Sep 2023 12:48:41 -0700
Subject: [PATCH 058/128] Update baseline, SDK
---
eng/Baseline.Designer.props | 444 ++++++++++++++++++------------------
eng/Baseline.xml | 214 ++++++++---------
eng/Versions.props | 2 +-
global.json | 4 +-
4 files changed, 332 insertions(+), 332 deletions(-)
diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props
index e79ad5771518..0b962449d9f1 100644
--- a/eng/Baseline.Designer.props
+++ b/eng/Baseline.Designer.props
@@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0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
@@ -769,7 +769,7 @@
- 6.0.21
+ 6.0.22
@@ -788,7 +788,7 @@
- 6.0.21
+ 6.0.22
@@ -804,46 +804,46 @@
- 6.0.21
+ 6.0.22
-
+
-
+
-
+
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
-
-
-
+
+
+
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
@@ -853,7 +853,7 @@
- 6.0.21
+ 6.0.22
@@ -862,73 +862,73 @@
- 6.0.21
+ 6.0.22
-
+
-
+
-
+
- 6.0.21
+ 6.0.22
-
+
-
+
-
+
- 6.0.21
+ 6.0.22
-
+
-
+
-
+
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
@@ -957,11 +957,11 @@
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
@@ -979,13 +979,13 @@
- 6.0.21
+ 6.0.22
- 6.0.21
+ 6.0.22
-
+
\ No newline at end of file
diff --git a/eng/Baseline.xml b/eng/Baseline.xml
index bb265398da62..2984eef6c6e4 100644
--- a/eng/Baseline.xml
+++ b/eng/Baseline.xml
@@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele
Update this list when preparing for a new patch.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/Versions.props b/eng/Versions.props
index aab6fc8d22e9..81189a0e17ed 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -9,7 +9,7 @@
6
0
23
- false
+ true
diff --git a/global.json b/global.json
index 94d19dcd0bfa..4cc2acb633b1 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "6.0.121"
+ "version": "6.0.122"
},
"tools": {
- "dotnet": "6.0.121",
+ "dotnet": "6.0.122",
"runtimes": {
"dotnet/x64": [
"2.1.30",
From 1158623143348068c71fc57ab897eb749a47018e Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 13 Sep 2023 00:03:56 +0000
Subject: [PATCH 059/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 8c2ffd2b1364..cd5e27c57aea 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 0fba7d464833..60e4d9c7329c 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -11,35 +11,35 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- a0b8ded285e2233a70b77c9a74b0ad32e1340739
+ 8a56239985565dd10bd1c7a62c848d15d4474f7b
https://github.com/dotnet/runtime
From 7fd5e4a50ee19583a8484550716053a134ee9fbd Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Thu, 14 Sep 2023 00:26:45 +0000
Subject: [PATCH 060/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20230913.4
Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport
From Version 6.0.23-servicing.23431.21 -> To Version 6.0.23-servicing.23463.4
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index cd5e27c57aea..0a49df1a9036 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 60e4d9c7329c..3e5e74df7c07 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 211b7ecbebe2576cbbbc205a3658361441018b61
+ ca8b53290abed6b00ae7a9cc331fbc69bc06026c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 211b7ecbebe2576cbbbc205a3658361441018b61
+ ca8b53290abed6b00ae7a9cc331fbc69bc06026c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 211b7ecbebe2576cbbbc205a3658361441018b61
+ ca8b53290abed6b00ae7a9cc331fbc69bc06026c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 211b7ecbebe2576cbbbc205a3658361441018b61
+ ca8b53290abed6b00ae7a9cc331fbc69bc06026c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 211b7ecbebe2576cbbbc205a3658361441018b61
+ ca8b53290abed6b00ae7a9cc331fbc69bc06026c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 211b7ecbebe2576cbbbc205a3658361441018b61
+ ca8b53290abed6b00ae7a9cc331fbc69bc06026c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 211b7ecbebe2576cbbbc205a3658361441018b61
+ ca8b53290abed6b00ae7a9cc331fbc69bc06026c
diff --git a/eng/Versions.props b/eng/Versions.props
index 249ab8a955bf..59e23174ca63 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.23
6.0.23
6.0.23
- 6.0.23-servicing.23431.21
+ 6.0.23-servicing.23463.4
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.23-servicing.23431.21
+ 6.0.23-servicing.23463.4
6.0.1
6.0.0
6.0.2
From 62b286638267db0d87d69b01680e425d64b0c971 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Tue, 19 Sep 2023 13:33:44 -0700
Subject: [PATCH 061/128] Adding MVC into the list of packages to build.
This is required for Vinyl to use razor views.
refs VINYL-15240
---
pack-list.txt | 62 +++++++++++------
pack.ps1 | 69 +++----------------
.../Microsoft.AspNetCore.Antiforgery.csproj | 2 +-
...AspNetCore.Components.Authorization.csproj | 1 +
.../Microsoft.AspNetCore.Components.csproj | 1 +
...crosoft.AspNetCore.Components.Forms.csproj | 1 +
...Microsoft.AspNetCore.Components.Web.csproj | 1 +
...Microsoft.AspNetCore.DataProtection.csproj | 1 +
...spNetCore.DataProtection.Extensions.csproj | 1 +
.../src/Microsoft.JSInterop.csproj | 1 +
...xtensions.Localization.Abstractions.csproj | 1 +
.../Microsoft.Extensions.Localization.csproj | 1 +
.../CORS/src/Microsoft.AspNetCore.Cors.csproj | 2 +-
.../src/Microsoft.AspNetCore.Mvc.Cors.csproj | 2 +-
...soft.AspNetCore.Mvc.DataAnnotations.csproj | 2 +-
...soft.AspNetCore.Mvc.Formatters.Json.csproj | 2 +-
...crosoft.AspNetCore.Mvc.Localization.csproj | 2 +-
.../src/Microsoft.AspNetCore.Mvc.Razor.csproj | 2 +-
...Microsoft.AspNetCore.Mvc.RazorPages.csproj | 2 +-
...Microsoft.AspNetCore.Mvc.TagHelpers.csproj | 2 +-
...crosoft.AspNetCore.Mvc.ViewFeatures.csproj | 2 +-
.../Mvc/src/Microsoft.AspNetCore.Mvc.csproj | 2 +-
22 files changed, 72 insertions(+), 90 deletions(-)
diff --git a/pack-list.txt b/pack-list.txt
index 2c2fe42bef72..65b35a99f398 100644
--- a/pack-list.txt
+++ b/pack-list.txt
@@ -1,28 +1,53 @@
-Microsoft.AspNetCore.Authentication.csproj
+Microsoft.AspNetCore.Antiforgery.csproj
Microsoft.AspNetCore.Authentication.Abstractions.csproj
Microsoft.AspNetCore.Authentication.Cookies.csproj
Microsoft.AspNetCore.Authentication.Core.csproj
+Microsoft.AspNetCore.Authentication.csproj
Microsoft.AspNetCore.Authorization.csproj
-Microsoft.AspNetCore.CookiePolicy.csproj
+Microsoft.AspNetCore.Authorization.Policy.csproj
+Microsoft.AspNetCore.Components.Authorization.csproj
+Microsoft.AspNetCore.Components.csproj
+Microsoft.AspNetCore.Components.Forms.csproj
+Microsoft.AspNetCore.Components.Web.csproj
Microsoft.AspNetCore.Connections.Abstractions.csproj
+Microsoft.AspNetCore.CookiePolicy.csproj
+Microsoft.AspNetCore.Cors.csproj
+Microsoft.AspNetCore.csproj
+Microsoft.AspNetCore.DataProtection.csproj
+Microsoft.AspNetCore.DataProtection.Extensions.csproj
Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
Microsoft.AspNetCore.Diagnostics.csproj
Microsoft.AspNetCore.HostFiltering.csproj
Microsoft.AspNetCore.Hosting.Abstractions.csproj
-Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
Microsoft.AspNetCore.Hosting.csproj
+Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
Microsoft.AspNetCore.Html.Abstractions.csproj
Microsoft.AspNetCore.Http.Abstractions.csproj
+Microsoft.AspNetCore.Http.Connections.Client.csproj
+Microsoft.AspNetCore.Http.Connections.Common.csproj
+Microsoft.AspNetCore.Http.Connections.csproj
+Microsoft.AspNetCore.Http.csproj
Microsoft.AspNetCore.Http.Extensions.csproj
Microsoft.AspNetCore.Http.Features.csproj
Microsoft.AspNetCore.Http.Results.csproj
-Microsoft.AspNetCore.Http.csproj
Microsoft.AspNetCore.HttpOverrides.csproj
Microsoft.AspNetCore.Localization.csproj
-Microsoft.AspNetCore.Owin.csproj
Microsoft.AspNetCore.Metadata.csproj
+Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
+Microsoft.AspNetCore.Mvc.Core.csproj
+Microsoft.AspNetCore.Mvc.Cors.csproj
+Microsoft.AspNetCore.Mvc.csproj
+Microsoft.AspNetCore.Mvc.DataAnnotations.csproj
+Microsoft.AspNetCore.Mvc.Formatters.Json.csproj
+Microsoft.AspNetCore.Mvc.Localization.csproj
+Microsoft.AspNetCore.Mvc.Razor.csproj
+Microsoft.AspNetCore.Mvc.RazorPages.csproj
+Microsoft.AspNetCore.Mvc.TagHelpers.csproj
+Microsoft.AspNetCore.Mvc.ViewFeatures.csproj
+Microsoft.AspNetCore.Owin.csproj
Microsoft.AspNetCore.Razor.csproj
Microsoft.AspNetCore.Razor.Runtime.csproj
+Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
Microsoft.AspNetCore.ResponseCompression.csproj
Microsoft.AspNetCore.Rewrite.csproj
Microsoft.AspNetCore.Routing.Abstractions.csproj
@@ -30,26 +55,23 @@ Microsoft.AspNetCore.Routing.csproj
Microsoft.AspNetCore.Server.IIS.csproj
Microsoft.AspNetCore.Server.IISIntegration.csproj
Microsoft.AspNetCore.Server.Kestrel.Core.csproj
+Microsoft.AspNetCore.Server.Kestrel.csproj
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
-Microsoft.AspNetCore.Server.Kestrel.csproj
+Microsoft.AspNetCore.SignalR.Common.csproj
+Microsoft.AspNetCore.SignalR.Core.csproj
+Microsoft.AspNetCore.SignalR.csproj
+Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
+Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
+Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
Microsoft.AspNetCore.StaticFiles.csproj
+Microsoft.AspNetCore.Websockets.csproj
Microsoft.AspNetCore.WebUtilities.csproj
-Microsoft.AspNetCore.csproj
Microsoft.Extensions.Features.csproj
Microsoft.Extensions.FileProviders.Embedded.csproj
+Microsoft.Extensions.Localization.Abstractions.csproj
+Microsoft.Extensions.Localization.csproj
Microsoft.Extensions.ObjectPool.csproj
Microsoft.Extensions.WebEncoders.csproj
-Microsoft.Net.Http.Headers.csproj
-Microsoft.AspNetCore.Authorization.Policy.csproj
-Microsoft.AspNetCore.Http.Connections.csproj
-Microsoft.AspNetCore.Http.Connections.Client.csproj
-Microsoft.AspNetCore.Http.Connections.Common.csproj
-Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
-Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
-Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
-Microsoft.AspNetCore.SignalR.Common.csproj
-Microsoft.AspNetCore.SignalR.Core.csproj
-Microsoft.AspNetCore.SignalR.csproj
-Microsoft.AspNetCore.Websockets.csproj
-Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
\ No newline at end of file
+Microsoft.JSInterop.csproj
+Microsoft.Net.Http.Headers.csproj
\ No newline at end of file
diff --git a/pack.ps1 b/pack.ps1
index 98ca2b2a4720..d39987452897 100644
--- a/pack.ps1
+++ b/pack.ps1
@@ -29,65 +29,16 @@ function Build-AspNetCore {
Push-Location -Path src/Servers/Kestrel
dotnet pack Kestrel.slnf
Pop-Location
-
- # Main libraries
- Build-Project Microsoft.AspNetCore.Authentication.csproj
- Build-Project Microsoft.AspNetCore.Authentication.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Authentication.Cookies.csproj
- Build-Project Microsoft.AspNetCore.Authentication.Core.csproj
- Build-Project Microsoft.AspNetCore.Authorization.csproj
- Build-Project Microsoft.AspNetCore.CookiePolicy.csproj
- Build-Project Microsoft.AspNetCore.Connections.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Diagnostics.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Diagnostics.csproj
- Build-Project Microsoft.AspNetCore.HostFiltering.csproj
- Build-Project Microsoft.AspNetCore.Hosting.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Hosting.csproj
- Build-Project Microsoft.AspNetCore.Http.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Http.Extensions.csproj
- Build-Project Microsoft.AspNetCore.Http.Features.csproj
- Build-Project Microsoft.AspNetCore.Http.Results.csproj
- Build-Project Microsoft.AspNetCore.Http.csproj
- Build-Project Microsoft.AspNetCore.HttpOverrides.csproj
- Build-Project Microsoft.AspNetCore.Localization.csproj
- Build-Project Microsoft.AspNetCore.Owin.csproj
- Build-Project Microsoft.AspNetCore.Metadata.csproj
- Build-Project Microsoft.AspNetCore.ResponseCompression.csproj
- Build-Project Microsoft.AspNetCore.Rewrite.csproj
- Build-Project Microsoft.AspNetCore.Routing.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Routing.csproj
- Build-Project Microsoft.AspNetCore.Server.Kestrel.Core.csproj
- Build-Project Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
- Build-Project Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj
- Build-Project Microsoft.AspNetCore.Server.Kestrel.csproj
- Build-Project Microsoft.AspNetCore.StaticFiles.csproj
- Build-Project Microsoft.AspNetCore.WebUtilities.csproj
- Build-Project Microsoft.AspNetCore.csproj
- Build-Project Microsoft.Extensions.Features.csproj
- Build-Project Microsoft.Extensions.FileProviders.Embedded.csproj
- Build-Project Microsoft.Extensions.ObjectPool.csproj
- Build-Project Microsoft.Extensions.WebEncoders.csproj
- Build-Project Microsoft.Net.Http.Headers.csproj
-
- # signalR
- Build-Project Microsoft.AspNetCore.Authorization.Policy.csproj
- Build-Project Microsoft.AspNetCore.Http.Connections.csproj
- Build-Project Microsoft.AspNetCore.Http.Connections.Client.csproj
- Build-Project Microsoft.AspNetCore.Http.Connections.Common.csproj
- Build-Project Microsoft.AspNetCore.SignalR.Protocols.Json.csproj
- Build-Project Microsoft.AspNetCore.SignalR.Protocols.MessagePack.csproj
- Build-Project Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.csproj
- Build-Project Microsoft.AspNetCore.SignalR.Common.csproj
- Build-Project Microsoft.AspNetCore.SignalR.Core.csproj
- Build-Project Microsoft.AspNetCore.SignalR.csproj
- Build-Project Microsoft.AspNetCore.Websockets.csproj
-
- # mvc minimal api
- Build-Project Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
- Build-Project Microsoft.AspNetCore.Mvc.Abstractions.csproj
- Build-Project Microsoft.AspNetCore.Mvc.Core.csproj
- Build-Project Microsoft.AspNetCore.ResponseCaching.Abstractions.csproj
+
+ foreach ($line in Get-Content .\pack-list.txt) {
+ if ([string]::IsNullOrWhiteSpace($line)) {
+ continue
+ }
+
+ Push-Location
+ Build-Project $line
+ Pop-Location
+ }
}
Build-AspNetCore
diff --git a/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj b/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj
index 4723a65cecd5..bccac6284e4c 100644
--- a/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj
+++ b/src/Antiforgery/src/Microsoft.AspNetCore.Antiforgery.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;antiforgery
- false
+ true
enable
diff --git a/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj
index 38edc14ae120..bffb452e17b5 100644
--- a/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj
+++ b/src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj
@@ -7,6 +7,7 @@
true
true
enable
+ true
diff --git a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
index f68c4e4bfcf1..54bed69d77fe 100644
--- a/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
+++ b/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj
@@ -8,6 +8,7 @@
enable
true
true
+ true
diff --git a/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj b/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj
index 7ac8a9203e0f..7e9bbc851bd4 100644
--- a/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj
+++ b/src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj
@@ -7,6 +7,7 @@
true
enable
true
+ true
diff --git a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj
index 985a9daef0a5..9facc80c499f 100644
--- a/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj
+++ b/src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj
@@ -8,6 +8,7 @@
Microsoft.AspNetCore.Components
enable
true
+ true
diff --git a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj
index f7f438a061d6..92df0743d7c6 100644
--- a/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj
+++ b/src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj
@@ -11,6 +11,7 @@
true
annotations
enable
+ true
diff --git a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj
index 35624976d7ad..c03ac331e06a 100644
--- a/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj
+++ b/src/DataProtection/Extensions/src/Microsoft.AspNetCore.DataProtection.Extensions.csproj
@@ -8,6 +8,7 @@
true
aspnetcore;dataprotection
enable
+ true
diff --git a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj
index 654b8bcb6014..a5006239b849 100644
--- a/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj
+++ b/src/JSInterop/Microsoft.JSInterop/src/Microsoft.JSInterop.csproj
@@ -9,6 +9,7 @@
enable
true
$(DefineConstants);JS_INTEROP
+ true
diff --git a/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj b/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj
index ac1da8c6f66b..1b6868636727 100644
--- a/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj
+++ b/src/Localization/Abstractions/src/Microsoft.Extensions.Localization.Abstractions.csproj
@@ -12,6 +12,7 @@ Microsoft.Extensions.Localization.IStringLocalizer<T>
localization
true
enable
+ true
diff --git a/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj b/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj
index 8847d3d0fb85..2b65123bb470 100644
--- a/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj
+++ b/src/Localization/Localization/src/Microsoft.Extensions.Localization.csproj
@@ -9,6 +9,7 @@
localization
true
enable
+ true
diff --git a/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj b/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj
index ac6088f6b326..11ea54d4d0c4 100644
--- a/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj
+++ b/src/Middleware/CORS/src/Microsoft.AspNetCore.Cors.csproj
@@ -9,7 +9,7 @@ Microsoft.AspNetCore.Cors.EnableCorsAttribute
true
true
aspnetcore;cors
- false
+ true
enable
diff --git a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj
index 74f4d8a64c6d..2c08a8e5cbee 100644
--- a/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj
+++ b/src/Mvc/Mvc.Cors/src/Microsoft.AspNetCore.Mvc.Cors.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;aspnetcoremvc;cors
- false
+ true
enable
diff --git a/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj b/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj
index 58e5493b6a3f..d3e4cc8cbec2 100644
--- a/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj
+++ b/src/Mvc/Mvc.DataAnnotations/src/Microsoft.AspNetCore.Mvc.DataAnnotations.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;aspnetcoremvc
- false
+ true
enable
diff --git a/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj b/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj
index 363fd6425d3f..7964572714d3 100644
--- a/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj
+++ b/src/Mvc/Mvc.Formatters.Json/src/Microsoft.AspNetCore.Mvc.Formatters.Json.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;aspnetcoremvc;json
- false
+ true
enable
diff --git a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj
index e9df28758ea6..012f28f56f90 100644
--- a/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj
+++ b/src/Mvc/Mvc.Localization/src/Microsoft.AspNetCore.Mvc.Localization.csproj
@@ -9,7 +9,7 @@ Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer
true
true
aspnetcore;aspnetcoremvc;localization
- false
+ true
diff --git a/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj b/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj
index 91ed0eb119b1..db576c187c76 100644
--- a/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj
+++ b/src/Mvc/Mvc.Razor/src/Microsoft.AspNetCore.Mvc.Razor.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;aspnetcoremvc;cshtml;razor
- false
+ true
enable
diff --git a/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj b/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj
index e5ab92f02d5a..ba14020dfa16 100644
--- a/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj
+++ b/src/Mvc/Mvc.RazorPages/src/Microsoft.AspNetCore.Mvc.RazorPages.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;aspnetcoremvc;cshtml;razor
- false
+ true
diff --git a/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj b/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj
index 68e0e76b65ef..e0d3be19ee33 100644
--- a/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj
+++ b/src/Mvc/Mvc.TagHelpers/src/Microsoft.AspNetCore.Mvc.TagHelpers.csproj
@@ -6,7 +6,7 @@
true
aspnetcore;aspnetcoremvc;taghelper;taghelpers
true
- false
+ true
disable
diff --git a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj
index f8674f725c6c..098ab0284f1c 100644
--- a/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj
+++ b/src/Mvc/Mvc.ViewFeatures/src/Microsoft.AspNetCore.Mvc.ViewFeatures.csproj
@@ -13,7 +13,7 @@
true
aspnetcore;aspnetcoremvc
true
- false
+ true
disable
diff --git a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj
index b25b41c7eb28..23083bd9c608 100644
--- a/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj
+++ b/src/Mvc/Mvc/src/Microsoft.AspNetCore.Mvc.csproj
@@ -6,7 +6,7 @@
true
aspnetcore;aspnetcoremvc
true
- false
+ true
From 3065067def4a66dece2b6404ebb22cf994840377 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 21 Sep 2023 15:10:25 -0700
Subject: [PATCH 062/128] Before turning on github actions, turn off ms builds.
---
.github/workflows/backport.yml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index 99ebe3b43d0c..a71aa0891ce3 100644
--- a/.github/workflows/backport.yml
+++ b/.github/workflows/backport.yml
@@ -1,7 +1,10 @@
name: Backport PR to branch
on:
- issue_comment:
- types: [created]
+ push:
+ branches:
+ preston-some-branch-that-doesn't-exist
+ #issue_comment:
+ # types: [created]
permissions:
contents: write
From 128947506bd5183c52e2d0bdab82697775b1f979 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 21 Sep 2023 15:10:43 -0700
Subject: [PATCH 063/128] Push to the latest dotnet 6 sdk.
---
global.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/global.json b/global.json
index 0c36880a1a04..dfce220b59a9 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "6.0.302"
+ "version": "6.0.414"
},
"tools": {
- "dotnet": "6.0.302",
+ "dotnet": "6.0.414",
"runtimes": {
"dotnet/x64": [
"2.1.30",
From f4a0ac16040871fb153aa91930f6269d04f63eaa Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 21 Sep 2023 15:32:50 -0700
Subject: [PATCH 064/128] Test build script.
---
.github/workflows/vinyl-build.yml | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 .github/workflows/vinyl-build.yml
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
new file mode 100644
index 000000000000..180a68f06b05
--- /dev/null
+++ b/.github/workflows/vinyl-build.yml
@@ -0,0 +1,31 @@
+name: Vinyl Maui Build
+run-name: ${{ github.actor }} is creating a vinyl maui build.
+on:
+ push:
+ branches: jbrelease/*
+
+jobs:
+ vinyl-build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install dotnet
+ uses: actions/setup-dotnet@v3
+ with:
+ global-json-file: global.json
+
+ - name: Check out repository code
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Build AspNetCore
+ run: ./pack.sh
+
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: vinyl-maui-aspnetcore
+ path: |
+ "artifacts/packages/Release/*.nupkg"
+
+ # Upload to github packages.
From fe7a73b1d8566e9b46dde4520822db58e5630489 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 21 Sep 2023 15:37:54 -0700
Subject: [PATCH 065/128] Need the code checked out before global.json is
available.
---
.github/workflows/vinyl-build.yml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 180a68f06b05..eb5748cbb89c 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -8,16 +8,16 @@ jobs:
vinyl-build:
runs-on: ubuntu-latest
steps:
- - name: Install dotnet
- uses: actions/setup-dotnet@v3
- with:
- global-json-file: global.json
-
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: recursive
+ - name: Install dotnet
+ uses: actions/setup-dotnet@v3
+ with:
+ global-json-file: global.json
+
- name: Build AspNetCore
run: ./pack.sh
From 356aabe0b076d6feb7bdef33d37d5e5d7833c2fe Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 21 Sep 2023 22:40:16 -0700
Subject: [PATCH 066/128] Change from running build in docker to calling builds
directly.
This should be faster... if it works. This script runs fine locally but on teamcity it caused issues. Might as well try it with github actions.
---
.github/workflows/vinyl-build.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index eb5748cbb89c..250c9fc5ef99 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -18,8 +18,12 @@ jobs:
with:
global-json-file: global.json
+ #- name: Build AspNetCore
+ # run: ./pack.sh
+
- name: Build AspNetCore
- run: ./pack.sh
+ shell: pwsh
+ run: ./pack.ps1
- name: Upload artifacts
uses: actions/upload-artifact@v3
From dab960188a4024a4fb83b070e8ce85c3e9ac0a43 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Thu, 21 Sep 2023 22:43:49 -0700
Subject: [PATCH 067/128] Another attempt
---
.github/workflows/vinyl-build.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 250c9fc5ef99..c32d5543dc86 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -20,7 +20,10 @@ jobs:
#- name: Build AspNetCore
# run: ./pack.sh
-
+
+ - name: Restore nuget packages.
+ run: dotnet restore
+
- name: Build AspNetCore
shell: pwsh
run: ./pack.ps1
From acc210378010a0fd1196169a06cec490450acd35 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 09:01:33 -0700
Subject: [PATCH 068/128] An attempt to upload a single nupkg to github
packages.
---
.github/workflows/vinyl-build.yml | 15 ++++++---------
pack.sh | 3 +++
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index c32d5543dc86..45dc848f06ac 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -18,15 +18,8 @@ jobs:
with:
global-json-file: global.json
- #- name: Build AspNetCore
- # run: ./pack.sh
-
- - name: Restore nuget packages.
- run: dotnet restore
-
- name: Build AspNetCore
- shell: pwsh
- run: ./pack.ps1
+ run: ./pack.sh
- name: Upload artifacts
uses: actions/upload-artifact@v3
@@ -35,4 +28,8 @@ jobs:
path: |
"artifacts/packages/Release/*.nupkg"
- # Upload to github packages.
+ - name: Add nuget source
+ run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
+
+ - name: Upload to nuget packages
+ run: dotnet nuget push *.nupkg --source "github"
\ No newline at end of file
diff --git a/pack.sh b/pack.sh
index 0d561614c311..45a4306ebd4e 100755
--- a/pack.sh
+++ b/pack.sh
@@ -12,4 +12,7 @@ do
echo $line
fullPath=$(pwd)/$(find . -iname "$line")
./dockerbuild.sh bionic --pack --configuration $configuration --projects $fullPath
+
+ # temporary quick exit while testing.
+ exit 0
done
From c172b70a18654f346323dc2cd4c8c67f67f47493 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 09:04:52 -0700
Subject: [PATCH 069/128] Incorrect path.
---
.github/workflows/vinyl-build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 45dc848f06ac..f11524a5148c 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -32,4 +32,4 @@ jobs:
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
- name: Upload to nuget packages
- run: dotnet nuget push *.nupkg --source "github"
\ No newline at end of file
+ run: dotnet nuget push "artifacts/packages/Release/*.nupkg" --source "github"
\ No newline at end of file
From 9617c2ae0ecf2ff0fcbca3beb285935cb0f06c61 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 09:09:19 -0700
Subject: [PATCH 070/128] Bad path.
---
.github/workflows/vinyl-build.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index f11524a5148c..309feeac87ff 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -26,10 +26,10 @@ jobs:
with:
name: vinyl-maui-aspnetcore
path: |
- "artifacts/packages/Release/*.nupkg"
+ "artifacts/packages/Release/Shipping/*.nupkg"
- name: Add nuget source
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
- name: Upload to nuget packages
- run: dotnet nuget push "artifacts/packages/Release/*.nupkg" --source "github"
\ No newline at end of file
+ run: dotnet nuget push "artifacts/packages/Release/Shipping/*.nupkg" --source "github"
\ No newline at end of file
From 95a916994f13f9f52c472f39c728fb34fff75272 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 09:22:25 -0700
Subject: [PATCH 071/128] Another attempt with debugging.
---
.github/workflows/vinyl-build.yml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 309feeac87ff..2cc0e13c620c 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -21,15 +21,21 @@ jobs:
- name: Build AspNetCore
run: ./pack.sh
+ - name: PWD
+ run: pwd
+
+ - name: LS
+ run: ls -al
+
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: vinyl-maui-aspnetcore
path: |
- "artifacts/packages/Release/Shipping/*.nupkg"
+ artifacts/packages/Release/Shipping/*.nupkg
- name: Add nuget source
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
- name: Upload to nuget packages
- run: dotnet nuget push "artifacts/packages/Release/Shipping/*.nupkg" --source "github"
\ No newline at end of file
+ run: dotnet nuget push artifacts/packages/Release/Shipping/*.nupkg --source "github"
\ No newline at end of file
From af7cc09603cded952cb281917f67378939b8824d Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 09:53:19 -0700
Subject: [PATCH 072/128] Separate out nuget package push
---
.github/workflows/vinyl-build.yml | 8 +-------
.github/workflows/vinyl-nuget-push.yml | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+), 7 deletions(-)
create mode 100644 .github/workflows/vinyl-nuget-push.yml
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 2cc0e13c620c..323f989ad36e 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -32,10 +32,4 @@ jobs:
with:
name: vinyl-maui-aspnetcore
path: |
- artifacts/packages/Release/Shipping/*.nupkg
-
- - name: Add nuget source
- run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
-
- - name: Upload to nuget packages
- run: dotnet nuget push artifacts/packages/Release/Shipping/*.nupkg --source "github"
\ No newline at end of file
+ artifacts/packages/Release/Shipping/*.nupkg
\ No newline at end of file
diff --git a/.github/workflows/vinyl-nuget-push.yml b/.github/workflows/vinyl-nuget-push.yml
new file mode 100644
index 000000000000..4c9c457032bb
--- /dev/null
+++ b/.github/workflows/vinyl-nuget-push.yml
@@ -0,0 +1,23 @@
+name: Vinyl Nuget Push
+run-name: ${{ github.actor }} is pushing nuget packages to github.
+on: [workflow_dispatch]
+
+jobs:
+ vinyl-nuget-push:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install dotnet and workloads
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '6.x'
+
+ - name: Download artifacts
+ uses: actions/download-artifact@v3
+ with:
+ name: vinyl-maui-aspnetcore
+
+ - name: Add nuget source
+ run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
+
+ - name: Upload github nuget packages (skipping duplicates)
+ run: dotnet nuget push *.nupkg --source "github" --skip-duplicate
\ No newline at end of file
From 5a59820ab1dc1d03a54c716f966ebcb038d60ebe Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 10:09:58 -0700
Subject: [PATCH 073/128] Splitting up files doesn't seem to work well.
---
.github/workflows/vinyl-build.yml | 8 +++++++-
.github/workflows/vinyl-nuget-push.yml | 23 -----------------------
2 files changed, 7 insertions(+), 24 deletions(-)
delete mode 100644 .github/workflows/vinyl-nuget-push.yml
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 323f989ad36e..9db22db55b49 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -32,4 +32,10 @@ jobs:
with:
name: vinyl-maui-aspnetcore
path: |
- artifacts/packages/Release/Shipping/*.nupkg
\ No newline at end of file
+ artifacts/packages/Release/Shipping/*.nupkg
+
+ - name: Add nuget source
+ run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
+
+ - name: Upload github nuget packages (skipping duplicates)
+ run: dotnet nuget push *.nupkg --source "github" --skip-duplicate
\ No newline at end of file
diff --git a/.github/workflows/vinyl-nuget-push.yml b/.github/workflows/vinyl-nuget-push.yml
deleted file mode 100644
index 4c9c457032bb..000000000000
--- a/.github/workflows/vinyl-nuget-push.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Vinyl Nuget Push
-run-name: ${{ github.actor }} is pushing nuget packages to github.
-on: [workflow_dispatch]
-
-jobs:
- vinyl-nuget-push:
- runs-on: ubuntu-latest
- steps:
- - name: Install dotnet and workloads
- uses: actions/setup-dotnet@v3
- with:
- dotnet-version: '6.x'
-
- - name: Download artifacts
- uses: actions/download-artifact@v3
- with:
- name: vinyl-maui-aspnetcore
-
- - name: Add nuget source
- run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
-
- - name: Upload github nuget packages (skipping duplicates)
- run: dotnet nuget push *.nupkg --source "github" --skip-duplicate
\ No newline at end of file
From a85823bf139f69178c4734fe695e95e3e8094126 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 10:12:59 -0700
Subject: [PATCH 074/128] Should be last step to get workflow running.
---
.github/workflows/vinyl-build.yml | 2 +-
pack.sh | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 9db22db55b49..759ce090be11 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -38,4 +38,4 @@ jobs:
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
- name: Upload github nuget packages (skipping duplicates)
- run: dotnet nuget push *.nupkg --source "github" --skip-duplicate
\ No newline at end of file
+ run: dotnet nuget push artifacts/packages/Release/Shipping/*.nupkg --source "github" --skip-duplicate
\ No newline at end of file
diff --git a/pack.sh b/pack.sh
index 45a4306ebd4e..0d561614c311 100755
--- a/pack.sh
+++ b/pack.sh
@@ -12,7 +12,4 @@ do
echo $line
fullPath=$(pwd)/$(find . -iname "$line")
./dockerbuild.sh bionic --pack --configuration $configuration --projects $fullPath
-
- # temporary quick exit while testing.
- exit 0
done
From 544315c568fad5ab8c7cc30442fb5eb2428583f7 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 10:15:11 -0700
Subject: [PATCH 075/128] Get rid of debugging.
---
.github/workflows/vinyl-build.yml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 759ce090be11..06d95554effb 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -21,12 +21,6 @@ jobs:
- name: Build AspNetCore
run: ./pack.sh
- - name: PWD
- run: pwd
-
- - name: LS
- run: ls -al
-
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
From 7917f010a3183602a96e46d6c43222ed485541e7 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 11:44:10 -0700
Subject: [PATCH 076/128] Remove automatic uploading of packages to nuget.
This can be handled manually as it's not reliable.
---
.github/workflows/vinyl-build.yml | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/vinyl-build.yml b/.github/workflows/vinyl-build.yml
index 06d95554effb..533e665819bc 100644
--- a/.github/workflows/vinyl-build.yml
+++ b/.github/workflows/vinyl-build.yml
@@ -28,8 +28,15 @@ jobs:
path: |
artifacts/packages/Release/Shipping/*.nupkg
- - name: Add nuget source
- run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
+ # Something to do with uploading the nuget packages is failing sporadically.
+ # I *think* it's because the symbol file is uploaded either before or too quickly after
+ # the main nuget package. If I run these steps manually after downloading the artifacts,
+ # I can just keep doing it until all packages get uploaded. So removing this step from
+ # the github workflow and making it manual for now. It's a pretty big decision to upload
+ # nuget packages anyhow since they can never be deleted.
+
+ #- name: Add nuget source
+ # run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jitterbit/index.json"
- - name: Upload github nuget packages (skipping duplicates)
- run: dotnet nuget push artifacts/packages/Release/Shipping/*.nupkg --source "github" --skip-duplicate
\ No newline at end of file
+ #- name: Upload github nuget packages (skipping duplicates)
+ # run: dotnet nuget push artifacts/packages/Release/Shipping/*.nupkg --source "github" --skip-duplicate
\ No newline at end of file
From 49b03bfc766926a5395805a7f5ba8d6657a0b94b Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Fri, 22 Sep 2023 12:02:18 -0700
Subject: [PATCH 077/128] Missing package.
---
pack-list.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/pack-list.txt b/pack-list.txt
index 65b35a99f398..d43b5876311f 100644
--- a/pack-list.txt
+++ b/pack-list.txt
@@ -33,6 +33,7 @@ Microsoft.AspNetCore.Http.Results.csproj
Microsoft.AspNetCore.HttpOverrides.csproj
Microsoft.AspNetCore.Localization.csproj
Microsoft.AspNetCore.Metadata.csproj
+Microsoft.AspNetCore.Mvc.Abstractions.csproj
Microsoft.AspNetCore.Mvc.ApiExplorer.csproj
Microsoft.AspNetCore.Mvc.Core.csproj
Microsoft.AspNetCore.Mvc.Cors.csproj
From ace21f35a573026130dca6fdac7332bb282134fd Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 27 Sep 2023 23:21:57 +0000
Subject: [PATCH 078/128] Merged PR 33979: [internal/release/frameshift/6.0]
Update dependencies from dnceng/internal/dotnet-runtime
This pull request updates the following dependencies
[marker]: <> (Begin:1c4b8d14-56b4-436a-cadd-08dbbf3cebf2)
## From https://github.com/dotnet/runtime
- **Subscription**: 1c4b8d14-56b4-436a-cadd-08dbbf3cebf2
- **Build**: 20230925.15
- **Date Produced**: September 26, 2023 7:07:48 AM UTC
- **Commit**: 301ba1ee5d1cfff28a8866924733603f3adf4936
- **Branch**: refs/heads/frameshift/internal/release/6.0
[DependencyUpdate]: <> (Begin)
- **Updates**:
- **Microsoft.Internal.Runtime.AspNetCore.Transport**: [from 6.0.21-servicing.23363.11 to 6.0.23-servicing.23475.15][1]
- **Microsoft.NET.Runtime.MonoAOTCompiler.Task**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.NET.Runtime.WebAssembly.Sdk**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.NETCore.App.Ref**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.NETCore.App.Runtime.win-x64**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.NETCore.BrowserDebugHost.Transport**: [from 6.0.21-servicing.23363.11 to 6.0.23-servicing.23475.15][1]
[1]: https://github.com/dotnet/runtime/compare/e40b3abf1b...301ba1ee5d
[DependencyUpdate]: <> (End)
[marker]: <> (End:1c4b8d14-56b4-436a-cadd-08dbbf3cebf2)
---
NuGet.config | 2 ++
eng/Version.Details.xml | 42 ++++++++++++++++++++---------------------
eng/Versions.props | 14 +++++++-------
3 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 1e2458c409ad..7c42342bf5ad 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,6 +4,7 @@
+
@@ -25,6 +26,7 @@
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index daa673a9468b..9af5757a4c2a 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+
+ https://github.com/dotnet/runtime
+ 301ba1ee5d1cfff28a8866924733603f3adf4936
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -245,33 +245,33 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+
+ https://github.com/dotnet/runtime
+ 301ba1ee5d1cfff28a8866924733603f3adf4936
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+
+ https://github.com/dotnet/runtime
+ 301ba1ee5d1cfff28a8866924733603f3adf4936
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+
+ https://github.com/dotnet/runtime
+ 301ba1ee5d1cfff28a8866924733603f3adf4936
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+
+ https://github.com/dotnet/runtime
+ 301ba1ee5d1cfff28a8866924733603f3adf4936
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+
+ https://github.com/dotnet/runtime
+ 301ba1ee5d1cfff28a8866924733603f3adf4936
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e40b3abf1b41621d4298642a5fd300ebf7cccf6d
+
+ https://github.com/dotnet/runtime
+ 301ba1ee5d1cfff28a8866924733603f3adf4936
diff --git a/eng/Versions.props b/eng/Versions.props
index c08c43481bca..81ae58ddbf63 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21-servicing.23363.11
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23-servicing.23475.15
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.21-servicing.23363.11
+ 6.0.23-servicing.23475.15
6.0.1
6.0.0
6.0.2
From b0468b9b0af17e4ad4be36198684741e1462bbcd Mon Sep 17 00:00:00 2001
From: Andrew Casey
Date: Fri, 22 Sep 2023 18:50:04 -0700
Subject: [PATCH 079/128] Track indicators of excessive stream resets
If the server has to send a lot of ENHANCE_YOUR_CALM messages or the output control flow queue is very large, there are probably a larger than expected number of client-initiated stream resets.
---
.../src/Internal/Http2/Http2Connection.cs | 106 ++++++++++++++++--
.../Internal/Infrastructure/IKestrelTrace.cs | 4 +
.../Internal/Infrastructure/KestrelTrace.cs | 16 +++
.../perf/Microbenchmarks/Mocks/MockTrace.cs | 2 +
.../Http2SampleApp/Http2SampleApp.csproj | 2 +-
.../shared/test/CompositeKestrelTrace.cs | 12 ++
6 files changed, 134 insertions(+), 8 deletions(-)
diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
index ac3e9d166d4d..e6adcfc28dc9 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
@@ -33,6 +33,42 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade
private const PseudoHeaderFields _mandatoryRequestPseudoHeaderFields =
PseudoHeaderFields.Method | PseudoHeaderFields.Path | PseudoHeaderFields.Scheme;
+ private const string EnhanceYourCalmMaximumCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.EnhanceYourCalmCount";
+ private const string MaximumFlowControlQueueSizeProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxConnectionFlowControlQueueSize";
+
+ private static readonly int _enhanceYourCalmMaximumCount = AppContext.GetData(EnhanceYourCalmMaximumCountProperty) is int eycMaxCount
+ ? eycMaxCount
+ : 10;
+
+ // Accumulate _enhanceYourCalmCount over the course of EnhanceYourCalmTickWindowCount ticks.
+ // This should make bursts less likely to trigger disconnects.
+ private const int EnhanceYourCalmTickWindowCount = 5;
+
+ private static bool IsEnhanceYourCalmEnabled => _enhanceYourCalmMaximumCount > 0;
+
+ private static readonly int? ConfiguredMaximumFlowControlQueueSize = GetConfiguredMaximumFlowControlQueueSize();
+
+ private static int? GetConfiguredMaximumFlowControlQueueSize()
+ {
+ var data = AppContext.GetData(MaximumFlowControlQueueSizeProperty);
+
+ if (data is int count)
+ {
+ return count;
+ }
+
+ if (data is string countStr && int.TryParse(countStr, out var parsed))
+ {
+ return parsed;
+ }
+
+ return null;
+ }
+
+ private readonly int _maximumFlowControlQueueSize;
+
+ private bool IsMaximumFlowControlQueueSizeEnabled => _maximumFlowControlQueueSize > 0;
+
private readonly HttpConnectionContext _context;
private readonly Http2FrameWriter _frameWriter;
private readonly Pipe _input;
@@ -40,7 +76,8 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade
private readonly int _minAllocBufferSize;
private readonly HPackDecoder _hpackDecoder;
private readonly InputFlowControl _inputFlowControl;
- private readonly OutputFlowControl _outputFlowControl = new OutputFlowControl(new MultipleAwaitableProvider(), Http2PeerSettings.DefaultInitialWindowSize);
+ private readonly OutputFlowControl _outputFlowControl;
+ private readonly AwaitableProvider _outputFlowControlAwaitableProvider; // Keep our own reference so we can track queue size
private readonly Http2PeerSettings _serverSettings = new Http2PeerSettings();
private readonly Http2PeerSettings _clientSettings = new Http2PeerSettings();
@@ -59,6 +96,9 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade
private int _clientActiveStreamCount;
private int _serverActiveStreamCount;
+ private int _enhanceYourCalmCount;
+ private int _tickCount;
+
// The following are the only fields that can be modified outside of the ProcessRequestsAsync loop.
private readonly ConcurrentQueue _completedStreams = new ConcurrentQueue();
private readonly StreamCloseAwaitable _streamCompletionAwaitable = new StreamCloseAwaitable();
@@ -88,6 +128,9 @@ public Http2Connection(HttpConnectionContext context)
// Capture the ExecutionContext before dispatching HTTP/2 middleware. Will be restored by streams when processing request
_context.InitialExecutionContext = ExecutionContext.Capture();
+ _outputFlowControlAwaitableProvider = new MultipleAwaitableProvider();
+ _outputFlowControl = new OutputFlowControl(_outputFlowControlAwaitableProvider, Http2PeerSettings.DefaultInitialWindowSize);
+
_frameWriter = new Http2FrameWriter(
context.Transport.Output,
context.ConnectionContext,
@@ -129,6 +172,16 @@ public Http2Connection(HttpConnectionContext context)
_serverSettings.MaxHeaderListSize = (uint)httpLimits.MaxRequestHeadersTotalSize;
_serverSettings.InitialWindowSize = (uint)http2Limits.InitialStreamWindowSize;
+ _maximumFlowControlQueueSize = ConfiguredMaximumFlowControlQueueSize is null
+ ? 4 * http2Limits.MaxStreamsPerConnection
+ : (int)ConfiguredMaximumFlowControlQueueSize;
+
+ if (_maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection)
+ {
+ _maximumFlowControlQueueSize = http2Limits.MaxStreamsPerConnection;
+ Log.LogTrace($"The configured maximum flow control queue size {ConfiguredMaximumFlowControlQueueSize} is less than the maximum streams per connection {http2Limits.MaxStreamsPerConnection} - increasing to match.");
+ }
+
// Start pool off at a smaller size if the max number of streams is less than the InitialStreamPoolSize
StreamPool = new PooledStreamStack(Math.Min(InitialStreamPoolSize, http2Limits.MaxStreamsPerConnection));
@@ -352,13 +405,20 @@ public async Task ProcessRequestsAsync(IHttpApplication appl
stream.Abort(new IOException(CoreStrings.Http2StreamAborted, connectionError));
}
- // Use the server _serverActiveStreamCount to drain all requests on the server side.
- // Can't use _clientActiveStreamCount now as we now decrement that count earlier/
- // Can't use _streams.Count as we wait for RST/END_STREAM before removing the stream from the dictionary
- while (_serverActiveStreamCount > 0)
+ // For some reason, this loop doesn't terminate when we're trying to abort.
+ // Since we're making a narrow fix for a patch, we'll bypass it in such scenarios.
+ // TODO: This is probably a bug - something in here should probably detect aborted
+ // connections and short-circuit.
+ if (!(IsEnhanceYourCalmEnabled || IsMaximumFlowControlQueueSizeEnabled) || error is not Http2ConnectionErrorException)
{
- await _streamCompletionAwaitable;
- UpdateCompletedStreams();
+ // Use the server _serverActiveStreamCount to drain all requests on the server side.
+ // Can't use _clientActiveStreamCount now as we now decrement that count earlier/
+ // Can't use _streams.Count as we wait for RST/END_STREAM before removing the stream from the dictionary
+ while (_serverActiveStreamCount > 0)
+ {
+ await _streamCompletionAwaitable;
+ UpdateCompletedStreams();
+ }
}
while (StreamPool.TryPop(out var pooledStream))
@@ -1053,6 +1113,20 @@ private void StartStream()
throw new Http2StreamErrorException(_currentHeadersStream.StreamId, CoreStrings.Http2ErrorMaxStreams, Http2ErrorCode.REFUSED_STREAM);
}
+ if (IsMaximumFlowControlQueueSizeEnabled && _outputFlowControlAwaitableProvider.ActiveCount > _maximumFlowControlQueueSize)
+ {
+ Log.Http2FlowControlQueueOperationsExceeded(_context.ConnectionId, _maximumFlowControlQueueSize);
+
+ // Now that we've logged a useful message, we can put vague text in the exception
+ // messages in case they somehow make it back to the client (not expected)
+
+ // This will close the socket - we want to do that right away
+ Abort(new ConnectionAbortedException("HTTP/2 connection exceeded the outgoing flow control maximum queue size."));
+
+ // Throwing an exception as well will help us clean up on our end more quickly by (e.g.) skipping processing of already-buffered input
+ throw new Http2ConnectionErrorException(CoreStrings.Http2ConnectionFaulted, Http2ErrorCode.INTERNAL_ERROR);
+ }
+
// We don't use the _serverActiveRequestCount here as during shutdown, it and the dictionary counts get out of sync.
// The streams still exist in the dictionary until the client responds with a RST or END_STREAM.
// Also, we care about the dictionary size for too much memory consumption.
@@ -1061,6 +1135,20 @@ private void StartStream()
// Server is getting hit hard with connection resets.
// Tell client to calm down.
// TODO consider making when to send ENHANCE_YOUR_CALM configurable?
+
+ if (IsEnhanceYourCalmEnabled && Interlocked.Increment(ref _enhanceYourCalmCount) > EnhanceYourCalmTickWindowCount * _enhanceYourCalmMaximumCount)
+ {
+ Log.Http2TooManyEnhanceYourCalms(_context.ConnectionId, _enhanceYourCalmMaximumCount);
+
+ // Now that we've logged a useful message, we can put vague text in the exception
+ // messages in case they somehow make it back to the client (not expected)
+
+ // This will close the socket - we want to do that right away
+ Abort(new ConnectionAbortedException(CoreStrings.Http2ConnectionFaulted));
+ // Throwing an exception as well will help us clean up on our end more quickly by (e.g.) skipping processing of already-buffered input
+ throw new Http2ConnectionErrorException(CoreStrings.Http2ConnectionFaulted, Http2ErrorCode.ENHANCE_YOUR_CALM);
+ }
+
throw new Http2StreamErrorException(_currentHeadersStream.StreamId, CoreStrings.Http2TellClientToCalmDown, Http2ErrorCode.ENHANCE_YOUR_CALM);
}
}
@@ -1123,6 +1211,10 @@ private void AbortStream(int streamId, IOException error)
void IRequestProcessor.Tick(DateTimeOffset now)
{
Input.CancelPendingRead();
+ if (IsEnhanceYourCalmEnabled && ++_tickCount % EnhanceYourCalmTickWindowCount == 0)
+ {
+ Interlocked.Exchange(ref _enhanceYourCalmCount, 0);
+ }
}
void IHttp2StreamLifetimeHandler.OnStreamCompleted(Http2Stream stream)
diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs
index 6a75f4657b14..6fb38405572f 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs
@@ -78,8 +78,12 @@ internal interface IKestrelTrace : ILogger
void Http2FrameSending(string connectionId, Http2Frame frame);
+ void Http2TooManyEnhanceYourCalms(string connectionId, int count);
+
void Http2MaxConcurrentStreamsReached(string connectionId);
+ void Http2FlowControlQueueOperationsExceeded(string connectionId, int count);
+
void InvalidResponseHeaderRemoved();
void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex);
diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
index 3c3b7bc4af07..364c5ed0f252 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
@@ -395,6 +395,22 @@ public void Http3GoAwayStreamId(string connectionId, long goAwayStreamId)
Http3GoAwayStreamId(_http3Logger, connectionId, goAwayStreamId);
}
+ [LoggerMessage(54, LogLevel.Error, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")]
+ private static partial void Http2TooManyEnhanceYourCalms(ILogger logger, string connectionId, int count);
+
+ public void Http2TooManyEnhanceYourCalms(string connectionId, int count)
+ {
+ Http2TooManyEnhanceYourCalms(_http2Logger, connectionId, count);
+ }
+
+ [LoggerMessage(55, LogLevel.Error, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")]
+ private static partial void Http2FlowControlQueueOperationsExceeded(ILogger logger, string connectionId, int count);
+
+ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count)
+ {
+ Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count);
+ }
+
public virtual void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter)
=> _generalLogger.Log(logLevel, eventId, state, exception, formatter);
diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs
index 7a87e2ee4041..ce71ea8255d9 100644
--- a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs
+++ b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs
@@ -59,7 +59,9 @@ public void Http2ConnectionClosing(string connectionId) { }
public void Http2ConnectionClosed(string connectionId, int highestOpenedStreamId) { }
public void Http2FrameReceived(string connectionId, Http2Frame frame) { }
public void Http2FrameSending(string connectionId, Http2Frame frame) { }
+ public void Http2TooManyEnhanceYourCalms(string connectionId, int count) { }
public void Http2MaxConcurrentStreamsReached(string connectionId) { }
+ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) { }
public void InvalidResponseHeaderRemoved() { }
public void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex) { }
public void Http3ConnectionClosing(string connectionId) { }
diff --git a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj
index cc404533ad8f..d0930e69fee0 100644
--- a/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj
+++ b/src/Servers/Kestrel/samples/Http2SampleApp/Http2SampleApp.csproj
@@ -1,4 +1,4 @@
-
+
$(DefaultNetCoreTargetFramework)
diff --git a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs
index 523e77a059ac..cede2f59521c 100644
--- a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs
+++ b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs
@@ -234,12 +234,24 @@ public void Http2FrameSending(string connectionId, Http2Frame frame)
_trace2.Http2FrameSending(connectionId, frame);
}
+ public void Http2TooManyEnhanceYourCalms(string connectionId, int count)
+ {
+ _trace1.Http2TooManyEnhanceYourCalms(connectionId, count);
+ _trace2.Http2TooManyEnhanceYourCalms(connectionId, count);
+ }
+
public void Http2MaxConcurrentStreamsReached(string connectionId)
{
_trace1.Http2MaxConcurrentStreamsReached(connectionId);
_trace2.Http2MaxConcurrentStreamsReached(connectionId);
}
+ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count)
+ {
+ _trace1.Http2FlowControlQueueOperationsExceeded(connectionId, count);
+ _trace2.Http2FlowControlQueueOperationsExceeded(connectionId, count);
+ }
+
public void InvalidResponseHeaderRemoved()
{
_trace1.InvalidResponseHeaderRemoved();
From 2a8a47bc1b6f787e165c57b19a0ff2048d33371a Mon Sep 17 00:00:00 2001
From: Andrew Casey
Date: Tue, 26 Sep 2023 17:58:44 -0700
Subject: [PATCH 080/128] Address PR feedback
---
.../src/Internal/Http2/Http2Connection.cs | 23 +++++++++++++++----
.../Internal/Infrastructure/IKestrelTrace.cs | 2 ++
.../Internal/Infrastructure/KestrelTrace.cs | 12 ++++++++--
.../perf/Microbenchmarks/Mocks/MockTrace.cs | 1 +
.../shared/test/CompositeKestrelTrace.cs | 6 +++++
5 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
index e6adcfc28dc9..34069616c6e3 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
@@ -36,9 +36,22 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade
private const string EnhanceYourCalmMaximumCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.EnhanceYourCalmCount";
private const string MaximumFlowControlQueueSizeProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxConnectionFlowControlQueueSize";
- private static readonly int _enhanceYourCalmMaximumCount = AppContext.GetData(EnhanceYourCalmMaximumCountProperty) is int eycMaxCount
- ? eycMaxCount
- : 10;
+ private static readonly int _enhanceYourCalmMaximumCount = GetEnhanceYourCalmMaximumCount();
+
+ private static int GetEnhanceYourCalmMaximumCount()
+ {
+ var data = AppContext.GetData(EnhanceYourCalmMaximumCountProperty);
+ if (data is int count)
+ {
+ return count;
+ }
+ if (data is string countStr && int.TryParse(countStr, out var parsed))
+ {
+ return parsed;
+ }
+
+ return 20; // Empirically derived
+ }
// Accumulate _enhanceYourCalmCount over the course of EnhanceYourCalmTickWindowCount ticks.
// This should make bursts less likely to trigger disconnects.
@@ -176,10 +189,10 @@ public Http2Connection(HttpConnectionContext context)
? 4 * http2Limits.MaxStreamsPerConnection
: (int)ConfiguredMaximumFlowControlQueueSize;
- if (_maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection)
+ if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection)
{
+ Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, http2Limits.MaxStreamsPerConnection, _maximumFlowControlQueueSize);
_maximumFlowControlQueueSize = http2Limits.MaxStreamsPerConnection;
- Log.LogTrace($"The configured maximum flow control queue size {ConfiguredMaximumFlowControlQueueSize} is less than the maximum streams per connection {http2Limits.MaxStreamsPerConnection} - increasing to match.");
}
// Start pool off at a smaller size if the max number of streams is less than the InitialStreamPoolSize
diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs
index 6fb38405572f..28b7b5cd8b05 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/IKestrelTrace.cs
@@ -84,6 +84,8 @@ internal interface IKestrelTrace : ILogger
void Http2FlowControlQueueOperationsExceeded(string connectionId, int count);
+ void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual);
+
void InvalidResponseHeaderRemoved();
void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex);
diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
index 364c5ed0f252..439fb69fbec4 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
@@ -395,7 +395,7 @@ public void Http3GoAwayStreamId(string connectionId, long goAwayStreamId)
Http3GoAwayStreamId(_http3Logger, connectionId, goAwayStreamId);
}
- [LoggerMessage(54, LogLevel.Error, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")]
+ [LoggerMessage(54, LogLevel.Debug, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")]
private static partial void Http2TooManyEnhanceYourCalms(ILogger logger, string connectionId, int count);
public void Http2TooManyEnhanceYourCalms(string connectionId, int count)
@@ -403,7 +403,7 @@ public void Http2TooManyEnhanceYourCalms(string connectionId, int count)
Http2TooManyEnhanceYourCalms(_http2Logger, connectionId, count);
}
- [LoggerMessage(55, LogLevel.Error, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")]
+ [LoggerMessage(55, LogLevel.Debug, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")]
private static partial void Http2FlowControlQueueOperationsExceeded(ILogger logger, string connectionId, int count);
public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count)
@@ -411,6 +411,14 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou
Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count);
}
+ [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size ""{Actual}"" is less than the maximum streams per connection ""{Expected}"" - increasing to match.", EventName = "Http2FlowControlQueueMaximumTooLow")]
+ private static partial void Http2FlowControlQueueMaximumTooLow(ILogger logger, string connectionId, int expected, int actual);
+
+ public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual)
+ {
+ Http2FlowControlQueueMaximumTooLow(_http3Logger, connectionId, expected, actual);
+ }
+
public virtual void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func formatter)
=> _generalLogger.Log(logLevel, eventId, state, exception, formatter);
diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs
index ce71ea8255d9..c9052461b9ed 100644
--- a/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs
+++ b/src/Servers/Kestrel/perf/Microbenchmarks/Mocks/MockTrace.cs
@@ -62,6 +62,7 @@ public void Http2FrameSending(string connectionId, Http2Frame frame) { }
public void Http2TooManyEnhanceYourCalms(string connectionId, int count) { }
public void Http2MaxConcurrentStreamsReached(string connectionId) { }
public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count) { }
+ public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual) { }
public void InvalidResponseHeaderRemoved() { }
public void Http3ConnectionError(string connectionId, Http3ConnectionErrorException ex) { }
public void Http3ConnectionClosing(string connectionId) { }
diff --git a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs
index cede2f59521c..1245abfd2a4b 100644
--- a/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs
+++ b/src/Servers/Kestrel/shared/test/CompositeKestrelTrace.cs
@@ -252,6 +252,12 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou
_trace2.Http2FlowControlQueueOperationsExceeded(connectionId, count);
}
+ public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual)
+ {
+ _trace1.Http2FlowControlQueueMaximumTooLow(connectionId, expected, actual);
+ _trace2.Http2FlowControlQueueMaximumTooLow(connectionId, expected, actual);
+ }
+
public void InvalidResponseHeaderRemoved()
{
_trace1.InvalidResponseHeaderRemoved();
From 7d6aec8e0b8a011b13ec29c56d8d1223b40fee02 Mon Sep 17 00:00:00 2001
From: Andrew Casey
Date: Tue, 26 Sep 2023 20:00:09 -0700
Subject: [PATCH 081/128] Address PR feedback
---
.../Core/src/Internal/Http2/Http2Connection.cs | 12 +++++++-----
.../Core/src/Internal/Infrastructure/KestrelTrace.cs | 6 +++---
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
index 34069616c6e3..5280f3e2b275 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
@@ -33,14 +33,14 @@ internal partial class Http2Connection : IHttp2StreamLifetimeHandler, IHttpHeade
private const PseudoHeaderFields _mandatoryRequestPseudoHeaderFields =
PseudoHeaderFields.Method | PseudoHeaderFields.Path | PseudoHeaderFields.Scheme;
- private const string EnhanceYourCalmMaximumCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.EnhanceYourCalmCount";
+ private const string MaximumEnhanceYourCalmCountProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxEnhanceYourCalmCount";
private const string MaximumFlowControlQueueSizeProperty = "Microsoft.AspNetCore.Server.Kestrel.Http2.MaxConnectionFlowControlQueueSize";
- private static readonly int _enhanceYourCalmMaximumCount = GetEnhanceYourCalmMaximumCount();
+ private static readonly int _enhanceYourCalmMaximumCount = GetMaximumEnhanceYourCalmCount();
- private static int GetEnhanceYourCalmMaximumCount()
+ private static int GetMaximumEnhanceYourCalmCount()
{
- var data = AppContext.GetData(EnhanceYourCalmMaximumCountProperty);
+ var data = AppContext.GetData(MaximumEnhanceYourCalmCountProperty);
if (data is int count)
{
return count;
@@ -186,7 +186,7 @@ public Http2Connection(HttpConnectionContext context)
_serverSettings.InitialWindowSize = (uint)http2Limits.InitialStreamWindowSize;
_maximumFlowControlQueueSize = ConfiguredMaximumFlowControlQueueSize is null
- ? 4 * http2Limits.MaxStreamsPerConnection
+ ? 4 * http2Limits.MaxStreamsPerConnection // 4 is a magic number to give us some padding above the expected maximum size
: (int)ConfiguredMaximumFlowControlQueueSize;
if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection)
@@ -1224,6 +1224,8 @@ private void AbortStream(int streamId, IOException error)
void IRequestProcessor.Tick(DateTimeOffset now)
{
Input.CancelPendingRead();
+ // We count EYCs over a window of a given length to avoid flagging short-lived bursts.
+ // At the end of each window, reset the count.
if (IsEnhanceYourCalmEnabled && ++_tickCount % EnhanceYourCalmTickWindowCount == 0)
{
Interlocked.Exchange(ref _enhanceYourCalmCount, 0);
diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
index 439fb69fbec4..6a9279e5a3f0 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
@@ -395,7 +395,7 @@ public void Http3GoAwayStreamId(string connectionId, long goAwayStreamId)
Http3GoAwayStreamId(_http3Logger, connectionId, goAwayStreamId);
}
- [LoggerMessage(54, LogLevel.Debug, @"Connection id ""{ConnectionId}"" aborted since at least ""{Count}"" ENHANCE_YOUR_CALM responses were required per second.", EventName = "Http2TooManyEnhanceYourCalms")]
+ [LoggerMessage(54, LogLevel.Debug, @"Connection id ""{ConnectionId}"" aborted since at least {Count} ENHANCE_YOUR_CALM responses were recorded per second.", EventName = "Http2TooManyEnhanceYourCalms")]
private static partial void Http2TooManyEnhanceYourCalms(ILogger logger, string connectionId, int count);
public void Http2TooManyEnhanceYourCalms(string connectionId, int count)
@@ -403,7 +403,7 @@ public void Http2TooManyEnhanceYourCalms(string connectionId, int count)
Http2TooManyEnhanceYourCalms(_http2Logger, connectionId, count);
}
- [LoggerMessage(55, LogLevel.Debug, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of ""{Count}"".", EventName = "Http2FlowControlQueueOperationsExceeded")]
+ [LoggerMessage(55, LogLevel.Debug, @"Connection id ""{ConnectionId}"" exceeded the output flow control maximum queue size of {Count}.", EventName = "Http2FlowControlQueueOperationsExceeded")]
private static partial void Http2FlowControlQueueOperationsExceeded(ILogger logger, string connectionId, int count);
public void Http2FlowControlQueueOperationsExceeded(string connectionId, int count)
@@ -411,7 +411,7 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou
Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count);
}
- [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size ""{Actual}"" is less than the maximum streams per connection ""{Expected}"" - increasing to match.", EventName = "Http2FlowControlQueueMaximumTooLow")]
+ [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")]
private static partial void Http2FlowControlQueueMaximumTooLow(ILogger logger, string connectionId, int expected, int actual);
public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual)
From 95bb0b8c16d3b27d41296a5a44f9f3b5d54d4a05 Mon Sep 17 00:00:00 2001
From: Andrew Casey
Date: Tue, 26 Sep 2023 20:04:26 -0700
Subject: [PATCH 082/128] Increase the min max queue size to match 7 and 8
---
.../Kestrel/Core/src/Internal/Http2/Http2Connection.cs | 7 ++++---
.../Core/src/Internal/Infrastructure/KestrelTrace.cs | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
index 5280f3e2b275..2e4a208fcc4e 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2Connection.cs
@@ -189,10 +189,11 @@ public Http2Connection(HttpConnectionContext context)
? 4 * http2Limits.MaxStreamsPerConnection // 4 is a magic number to give us some padding above the expected maximum size
: (int)ConfiguredMaximumFlowControlQueueSize;
- if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection)
+ var minimumMaximumFlowControlQueueSize = 2 * http2Limits.MaxStreamsPerConnection; // Double to match 7.0 and 8.0
+ if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < minimumMaximumFlowControlQueueSize)
{
- Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, http2Limits.MaxStreamsPerConnection, _maximumFlowControlQueueSize);
- _maximumFlowControlQueueSize = http2Limits.MaxStreamsPerConnection;
+ Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, minimumMaximumFlowControlQueueSize, _maximumFlowControlQueueSize);
+ _maximumFlowControlQueueSize = minimumMaximumFlowControlQueueSize;
}
// Start pool off at a smaller size if the max number of streams is less than the InitialStreamPoolSize
diff --git a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
index 6a9279e5a3f0..c1a6021549f5 100644
--- a/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
+++ b/src/Servers/Kestrel/Core/src/Internal/Infrastructure/KestrelTrace.cs
@@ -411,7 +411,7 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou
Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count);
}
- [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")]
+ [LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than double the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")]
private static partial void Http2FlowControlQueueMaximumTooLow(ILogger logger, string connectionId, int expected, int actual);
public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual)
From 1d49c492e467318607e5874fc6af645115fd0434 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Thu, 28 Sep 2023 01:32:29 +0000
Subject: [PATCH 083/128] Merged PR 33993: [internal/release/frameshift/6.0]
Update dependencies from dnceng/internal/dotnet-efcore
This pull request updates the following dependencies
[marker]: <> (Begin:5290da81-c92c-4654-752d-08dbbf92e774)
## From https://github.com/dotnet/efcore
- **Subscription**: 5290da81-c92c-4654-752d-08dbbf92e774
- **Build**: 20230927.15
- **Date Produced**: September 28, 2023 1:08:02 AM UTC
- **Commit**: 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
- **Branch**: refs/heads/internal/release/frameshift/6.0
[DependencyUpdate]: <> (Begin)
- **Updates**:
- **dotnet-ef**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.EntityFrameworkCore**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.EntityFrameworkCore.Design**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.EntityFrameworkCore.InMemory**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.EntityFrameworkCore.Relational**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.EntityFrameworkCore.Sqlite**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.EntityFrameworkCore.SqlServer**: [from 6.0.21 to 6.0.23][1]
- **Microsoft.EntityFrameworkCore.Tools**: [from 6.0.21 to 6.0.23][1]
[1]: https://github.com/dotnet/efcore/compare/fa741b8bad...50a6896cca
[DependencyUpdate]: <> (End)
[marker]: <> (End:5290da81-c92c-4654-752d-08dbbf92e774)
---
NuGet.config | 2 ++
eng/Version.Details.xml | 48 ++++++++++++++++++++---------------------
eng/Versions.props | 16 +++++++-------
3 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 7c42342bf5ad..8bbcc5e342e0 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,6 +7,7 @@
+
@@ -24,6 +25,7 @@
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 9af5757a4c2a..ed44928afcc8 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
-
- https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- fa741b8bad8eebb503bba99e078538f97aff3f5d
+
+ https://github.com/dotnet/efcore
+ 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index 81ae58ddbf63..39fb8e05250c 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.11
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
- 6.0.21
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
+ 6.0.23
6.0.0-beta.23408.5
6.0.0-beta.23408.5
From b1eee58b6f09b977a5ab9c49f5da5904bee421c8 Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Sat, 30 Sep 2023 00:13:18 +0000
Subject: [PATCH 084/128] Update dependencies from
https://github.com/dotnet/runtime build 20230929.5
Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NETCore.BrowserDebugHost.Transport
From Version 6.0.23-servicing.23475.15 -> To Version 6.0.23-servicing.23479.5
---
NuGet.config | 8 ++++++--
eng/Version.Details.xml | 4 ++--
eng/Versions.props | 4 ++--
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 8bbcc5e342e0..22c8c5eb5bb8 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,12 @@
-
+
+
+
@@ -25,10 +27,12 @@
+
+
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index ed44928afcc8..160770633949 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,7 +177,7 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://github.com/dotnet/runtime
301ba1ee5d1cfff28a8866924733603f3adf4936
@@ -269,7 +269,7 @@
https://github.com/dotnet/runtime
301ba1ee5d1cfff28a8866924733603f3adf4936
-
+
https://github.com/dotnet/runtime
301ba1ee5d1cfff28a8866924733603f3adf4936
diff --git a/eng/Versions.props b/eng/Versions.props
index 39fb8e05250c..5c43c68802dd 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.23
6.0.23
6.0.23
- 6.0.23-servicing.23475.15
+ 6.0.23-servicing.23479.5
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.23-servicing.23475.15
+ 6.0.23-servicing.23479.5
6.0.1
6.0.0
6.0.2
From fc82f0d6e59d13c81fae92f775de1cfbfc1a4000 Mon Sep 17 00:00:00 2001
From: Mackinnon Buck
Date: Wed, 6 Sep 2023 10:40:25 -0700
Subject: [PATCH 085/128] Update jquery-validation to v1.19.5 (#50484)
---
.../Pages/V4/_ValidationScriptsPartial.cshtml | 4 +-
.../Pages/V5/_ValidationScriptsPartial.cshtml | 4 +-
src/Identity/UI/src/THIRD-PARTY-NOTICES.txt | 2 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../Shared/_ValidationScriptsPartial.cshtml | 2 +-
.../Shared/_ValidationScriptsPartial.cshtml | 2 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
src/ProjectTemplates/THIRD-PARTY-NOTICES | 2 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../dist/additional-methods.js | 424 +++++-
.../dist/additional-methods.min.js | 6 +-
.../jquery-validation/dist/jquery.validate.js | 118 +-
.../dist/jquery.validate.min.js | 6 +-
.../samples/ClaimsTransformation/bower.json | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 16 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
.../wwwroot/lib/jquery/.bower.json | 2 +-
.../wwwroot/lib/jquery/dist/jquery.min.map | 2 +-
src/Security/samples/Cookies/bower.json | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 16 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
.../Cookies/wwwroot/lib/jquery/.bower.json | 2 +-
.../wwwroot/lib/jquery/dist/jquery.min.map | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 19 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../wwwroot/lib/jquery-validation/.bower.json | 19 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../samples/PathSchemeSelection/bower.json | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 16 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
.../wwwroot/lib/jquery/.bower.json | 2 +-
.../wwwroot/lib/jquery/dist/jquery.min.map | 2 +-
.../wwwroot/lib/jquery-validation/.bower.json | 19 +-
.../dist/additional-methods.js | 1264 ++++++++++++-----
.../dist/additional-methods.min.js | 8 +-
.../jquery-validation/dist/jquery.validate.js | 855 +++++++----
.../dist/jquery.validate.min.js | 8 +-
65 files changed, 11695 insertions(+), 4546 deletions(-)
diff --git a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml
index 74ca36266548..a67a209cbe94 100644
--- a/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml
+++ b/src/Identity/UI/src/Areas/Identity/Pages/V4/_ValidationScriptsPartial.cshtml
@@ -3,11 +3,11 @@
-
-
+
diff --git a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml
index 6cd4eed86820..da4aebe98a86 100644
--- a/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml
+++ b/src/Identity/samples/IdentitySample.Mvc/Views/Shared/_ValidationScriptsPartial.cshtml
@@ -1,2 +1,2 @@
-
+
diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Identity/testassets/Identity.DefaultUI.WebSite/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/ProjectTemplates/THIRD-PARTY-NOTICES b/src/ProjectTemplates/THIRD-PARTY-NOTICES
index 40f4f3076988..d02758db71c9 100644
--- a/src/ProjectTemplates/THIRD-PARTY-NOTICES
+++ b/src/ProjectTemplates/THIRD-PARTY-NOTICES
@@ -168,7 +168,7 @@ externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.
-License notice for jQuery Validation v1.17.0
+License notice for jQuery Validation v1.19.5
--------------------------------------------
The MIT License (MIT)
=====================
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
index e129bc0f74b9..c6a7229185ab 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,9 +1,9 @@
/*!
- * jQuery Validation Plugin v1.17.0
+ * jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
- * Copyright (c) 2017 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@@ -43,6 +43,38 @@
}() );
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
+
// Accept a value from a file input based on a required mimetype
$.validator.addMethod( "accept", function( value, element, param ) {
@@ -87,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
$.validator.addMethod( "alphanumeric", function( value, element ) {
return this.optional( element ) || /^\w+$/i.test( value );
-}, "Letters, numbers, and underscores only please" );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -114,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number" );
+}, "Please specify a valid bank account number." );
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
return this.optional( element ) ||
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
( $.validator.methods.giroaccountNL.call( this, value, element ) );
-}, "Please specify a valid bank or giro account number" );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -139,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
*/
$.validator.addMethod( "bic", function( value, element ) {
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
-}, "Please specify a valid BIC code" );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -256,11 +288,141 @@ $.validator.addMethod( "cifES", function( value, element ) {
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod( "cpfBR", function( value ) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
// Removing special characters from value
value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
@@ -315,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value ) {
}
return false;
-}, "Please specify a valid CPF number" );
+}, "Please specify a valid CPF number." );
// https://jqueryvalidation.org/creditcard-method/
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -337,7 +499,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
value = value.replace( /\D/g, "" );
// Basing min and max length on
- // https://developer.ean.com/general_info/Valid_Credit_Card_Types
+ // https://dev.ean.com/general-info/valid-card-types/
if ( value.length < 13 || value.length > 19 ) {
return false;
}
@@ -359,7 +521,7 @@ $.validator.addMethod( "creditcard", function( value, element ) {
}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
@@ -398,7 +560,7 @@ $.validator.addMethod( "creditcardtypes", function( value, element, param ) {
if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if ( validTypes & 0x0001 && /^(5[12345])/.test( value ) ) { // Mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
@@ -468,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
regex = new RegExp( regex );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency" );
+}, "Please specify a valid currency." );
$.validator.addMethod( "dateFA", function( value, element ) {
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -529,7 +691,31 @@ $.validator.addMethod( "extension", function( value, element, param ) {
*/
$.validator.addMethod( "giroaccountNL", function( value, element ) {
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
-}, "Please specify a valid giro account number" );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
@@ -666,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN" );
+}, "Please specify a valid IBAN." );
$.validator.addMethod( "integer", function( value, element ) {
return this.optional( element ) || /^-?\d+$/.test( value );
-}, "A positive or negative non-decimal number please" );
+}, "A positive or negative non-decimal number please." );
$.validator.addMethod( "ipv4", function( value, element ) {
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -680,17 +866,103 @@ $.validator.addMethod( "ipv6", function( value, element ) {
return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
}, "Please enter a valid IP v6 address." );
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
$.validator.addMethod( "lettersonly", function( value, element ) {
return this.optional( element ) || /^[a-z]+$/i.test( value );
-}, "Letters only please" );
+}, "Letters only please." );
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
-}, "Letters or punctuation only please" );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
$.validator.addMethod( "mobileNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -704,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
-}, "Please specify a valid mobile number" );
+}, "Please specify a valid mobile number." );
$.validator.addMethod( "netmask", function( value, element ) {
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -804,13 +1076,71 @@ $.validator.addMethod( "nipPL", function( value ) {
return ( intControlNr === parseInt( value[ 9 ], 10 ) );
}, "Please specify a valid NIP number." );
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
$.validator.addMethod( "nowhitespace", function( value, element ) {
return this.optional( element ) || /^\S+$/i.test( value );
-}, "No white space please" );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -842,6 +1172,30 @@ $.validator.addMethod( "phoneNL", function( value, element ) {
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
}, "Please specify a valid phone number." );
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
+
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
* ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
@@ -856,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
-}, "Please specify a valid uk phone number" );
+}, "Please specify a valid uk phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -870,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
-}, "Please specify a valid phone number" );
+}, "Please specify a valid phone number." );
/**
* Matches US phone number format
@@ -891,8 +1245,8 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
$.validator.addMethod( "phoneUS", function( phone_number, element ) {
phone_number = phone_number.replace( /\s+/g, "" );
return this.optional( element ) || phone_number.length > 9 &&
- phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/ );
-}, "Please specify a valid phone number" );
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
/*
* Valida CEPs do brasileiros:
@@ -921,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
$.validator.addMethod( "postalcodeIT", function( value, element ) {
return this.optional( element ) || /^\d{5}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
$.validator.addMethod( "postalcodeNL", function( value, element ) {
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
-}, "Please specify a valid postal code" );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
$.validator.addMethod( "postcodeUK", function( value, element ) {
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
-}, "Please specify a valid UK postcode" );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1072,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
return this.optional( element ) || regex.test( value );
-}, "Please specify a valid state" );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
return $( value ).text().length >= param;
-}, $.validator.format( "Please enter at least {0} characters" ) );
+}, $.validator.format( "Please enter at least {0} characters." ) );
$.validator.addMethod( "time", function( value, element ) {
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
-}, "Please enter a valid time, between 00:00 and 23:59" );
+}, "Please enter a valid time, between 00:00 and 23:59." );
$.validator.addMethod( "time12h", function( value, element ) {
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
-}, "Please enter a valid time in 12-hour am/pm format" );
+}, "Please enter a valid time in 12-hour am/pm format." );
// Same as url, but TLD is optional
$.validator.addMethod( "url2", function( value, element ) {
- return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
}, $.validator.messages.url );
/**
@@ -1149,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
$.validator.addMethod( "zipcodeUS", function( value, element ) {
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
-}, "The specified US ZIP Code is invalid" );
+}, "The specified US ZIP Code is invalid." );
$.validator.addMethod( "ziprange", function( value, element ) {
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
return $;
}));
\ No newline at end of file
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index 6767f24f6b12..80f14b58c2e1 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g,h="string"==typeof d?d.replace(/\s/g,""):"image/*",i=this.optional(c);if(i)return i;if("file"===a(c).attr("type")&&(h=h.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),c.files&&c.files.length))for(g=new RegExp(".?("+h+")$","i"),e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;e<=9;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;e<=10;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.length9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c?@\[\]^`{|}~])/g, "\\$1" );
},
@@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
@@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
- .removeClass( "validate-equalTo-blur" );
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -1199,7 +1236,7 @@ $.extend( $.validator, {
// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1246,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1292,7 +1335,7 @@ $.extend( $.validator, {
// Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );
// Clean number parameters
@@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
+ if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
// https://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
@@ -1416,19 +1476,19 @@ $.extend( $.validator, {
// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 20402da5d3fb..442a41317af9 100644
--- a/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
* https://jqueryvalidation.org/
- * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
\ No newline at end of file
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/bower.json b/src/Security/samples/ClaimsTransformation/bower.json
index bf55590ec5a4..c5d338ecc3db 100644
--- a/src/Security/samples/ClaimsTransformation/bower.json
+++ b/src/Security/samples/ClaimsTransformation/bower.json
@@ -4,7 +4,7 @@
"dependencies": {
"bootstrap": "3.4.0",
"jquery": "3.5.1",
- "jquery-validation": "1.14.0",
+ "jquery-validation": "1.19.5",
"jquery-validation-unobtrusive": "3.2.6"
}
}
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..e842c332996a 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,14 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
"_originalSource": "jquery-validation"
}
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(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\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json
index e3218a820ef1..711216051c4d 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/.bower.json
@@ -22,4 +22,4 @@
"_source": "git://github.com/jquery/jquery-dist.git",
"_target": "3.5.1",
"_originalSource": "jquery"
-}
\ No newline at end of file
+}
diff --git a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map
index cbe1012155ca..9a4ee2f9cc81 100644
--- a/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map
+++ b/src/Security/samples/ClaimsTransformation/wwwroot/lib/jquery/dist/jquery.min.map
@@ -1 +1 @@
-{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,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,EACJ/oC,EAAOge,YAEPhe,EAAO4X,OAAO,IAGhB5X,EAAO6C,QAAUD,MAAMC,QACvB7C,EAAOgpC,UAAY/oB,KAAKC,MACxBlgB,EAAOqJ,SAAWA,EAClBrJ,EAAO1B,WAAaA,EACpB0B,EAAOvB,SAAWA,EAClBuB,EAAOgf,UAAYA,EACnBhf,EAAOrB,KAAOmB,EAEdE,EAAOqpB,IAAM3jB,KAAK2jB,IAElBrpB,EAAOipC,UAAY,SAAU1qC,GAK5B,IAAII,EAAOqB,EAAOrB,KAAMJ,GACxB,OAAkB,WAATI,GAA8B,WAATA,KAK5BuqC,MAAO3qC,EAAM0xB,WAAY1xB,KAG5ByB,EAAOmpC,KAAO,SAAU5pC,GACvB,OAAe,MAARA,EACN,IACEA,EAAO,IAAK2D,QAAS8D,GAAO,KAkBT,mBAAXoiC,QAAyBA,OAAOC,KAC3CD,OAAQ,SAAU,GAAI,WACrB,OAAOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
\ No newline at end of file
+{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAAOL,EAAIK,KAAO,SAAUC,GAC/B,OAAON,EAAIK,KAAKE,KAAMD,IACnB,SAAUA,GACb,OAAON,EAAIQ,OAAOC,MAAO,GAAIH,IAI1BI,EAAOV,EAAIU,KAEXC,EAAUX,EAAIW,QAEdC,EAAa,GAEbC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,EAAuBD,EAAWT,KAAML,QAExCgB,EAAU,GAEVC,EAAa,SAAqBC,GAMhC,MAAsB,mBAARA,GAA8C,iBAAjBA,EAAIC,UAIjDC,EAAW,SAAmBF,G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AOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
diff --git a/src/Security/samples/Cookies/bower.json b/src/Security/samples/Cookies/bower.json
index bf55590ec5a4..c5d338ecc3db 100644
--- a/src/Security/samples/Cookies/bower.json
+++ b/src/Security/samples/Cookies/bower.json
@@ -4,7 +4,7 @@
"dependencies": {
"bootstrap": "3.4.0",
"jquery": "3.5.1",
- "jquery-validation": "1.14.0",
+ "jquery-validation": "1.19.5",
"jquery-validation-unobtrusive": "3.2.6"
}
}
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..e842c332996a 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,14 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
"_originalSource": "jquery-validation"
}
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json b/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json
index e3218a820ef1..711216051c4d 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery/.bower.json
@@ -22,4 +22,4 @@
"_source": "git://github.com/jquery/jquery-dist.git",
"_target": "3.5.1",
"_originalSource": "jquery"
-}
\ No newline at end of file
+}
diff --git a/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map b/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map
index cbe1012155ca..9a4ee2f9cc81 100644
--- a/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map
+++ b/src/Security/samples/Cookies/wwwroot/lib/jquery/dist/jquery.min.map
@@ -1 +1 @@
-{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,G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QpE,EAAOoE,OAElCykC,GAGR7oC,EAAO8oC,UAAY,SAAUC,GACvBA,EACJ/oC,EAAOge,YAEPhe,EAAO4X,OAAO,IAGhB5X,EAAO6C,QAAUD,MAAMC,QACvB7C,EAAOgpC,UAAY/oB,KAAKC,MACxBlgB,EAAOqJ,SAAWA,EAClBrJ,EAAO1B,WAAaA,EACpB0B,EAAOvB,SAAWA,EAClBuB,EAAOgf,UAAYA,EACnBhf,EAAOrB,KAAOmB,EAEdE,EAAOqpB,IAAM3jB,KAAK2jB,IAElBrpB,EAAOipC,UAAY,SAAU1qC,GAK5B,IAAII,EAAOqB,EAAOrB,KAAMJ,GACxB,OAAkB,WAATI,GAA8B,WAATA,KAK5BuqC,MAAO3qC,EAAM0xB,WAAY1xB,KAG5ByB,EAAOmpC,KAAO,SAAU5pC,GACvB,OAAe,MAARA,EACN,IACEA,EAAO,IAAK2D,QAAS8D,GAAO,KAkBT,mBAAXoiC,QAAyBA,OAAOC,KAC3CD,OAAQ,SAAU,GAAI,WACrB,OAAOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
\ No newline at end of file
+{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAAOL,EAAIK,KAAO,SAAUC,GAC/B,OAAON,EAAIK,KAAKE,KAAMD,IACnB,SAAUA,GACb,OAAON,EAAIQ,OAAOC,MAAO,GAAIH,IAI1BI,EAAOV,EAAIU,KAEXC,EAAUX,EAAIW,QAEdC,EAAa,GAEbC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,EAAuBD,EAAWT,KAAML,QAExCgB,EAAU,GAEVC,EAAa,SAAqBC,GAMhC,MA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AOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
diff --git a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..4c51b65cfe56 100644
--- a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,15 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
- "_originalSource": "jquery-validation"
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
+ "_originalSource": "jquery-validation",
+ "_direct": true
}
\ No newline at end of file
diff --git a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF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|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js
index 4e979bcf67fd..cd0442eb98af 100644
--- a/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js
+++ b/src/Security/samples/DynamicSchemes/wwwroot/lib/jquery-validation/dist/jquery.validate.js
@@ -1,24 +1,27 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-$.extend($.fn, {
- // http://jqueryvalidation.org/validate/
+$.extend( $.fn, {
+
+ // https://jqueryvalidation.org/validate/
validate: function( options ) {
- // if nothing is selected, return nothing; can't chain anyway
+ // If nothing is selected, return nothing; can't chain anyway
if ( !this.length ) {
if ( options && options.debug && window.console ) {
console.warn( "Nothing selected, can't validate, returning nothing." );
@@ -26,7 +29,7 @@ $.extend($.fn, {
return;
}
- // check if a validator for this form was already created
+ // Check if a validator for this form was already created
var validator = $.data( this[ 0 ], "validator" );
if ( validator ) {
return validator;
@@ -41,40 +44,50 @@ $.extend($.fn, {
if ( validator.settings.onsubmit ) {
this.on( "click.validate", ":submit", function( event ) {
- if ( validator.settings.submitHandler ) {
- validator.submitButton = event.target;
- }
- // allow suppressing validation by adding a cancel class to the submit button
+ // Track the used submit button to properly handle scripted
+ // submits later.
+ validator.submitButton = event.currentTarget;
+
+ // Allow suppressing validation by adding a cancel class to the submit button
if ( $( this ).hasClass( "cancel" ) ) {
validator.cancelSubmit = true;
}
- // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
if ( $( this ).attr( "formnovalidate" ) !== undefined ) {
validator.cancelSubmit = true;
}
- });
+ } );
- // validate the form on submit
+ // Validate the form on submit
this.on( "submit.validate", function( event ) {
if ( validator.settings.debug ) {
- // prevent form submit to be able to see console output
+
+ // Prevent form submit to be able to see console output
event.preventDefault();
}
+
function handle() {
var hidden, result;
- if ( validator.settings.submitHandler ) {
- if ( validator.submitButton ) {
- // insert a hidden input as a replacement for the missing submit button
- hidden = $( "" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..4c51b65cfe56 100644
--- a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,15 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
- "_originalSource": "jquery-validation"
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
+ "_originalSource": "jquery-validation",
+ "_direct": true
}
\ No newline at end of file
diff --git a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js
index 4e979bcf67fd..cd0442eb98af 100644
--- a/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js
+++ b/src/Security/samples/Identity.ExternalClaims/wwwroot/lib/jquery-validation/dist/jquery.validate.js
@@ -1,24 +1,27 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-$.extend($.fn, {
- // http://jqueryvalidation.org/validate/
+$.extend( $.fn, {
+
+ // https://jqueryvalidation.org/validate/
validate: function( options ) {
- // if nothing is selected, return nothing; can't chain anyway
+ // If nothing is selected, return nothing; can't chain anyway
if ( !this.length ) {
if ( options && options.debug && window.console ) {
console.warn( "Nothing selected, can't validate, returning nothing." );
@@ -26,7 +29,7 @@ $.extend($.fn, {
return;
}
- // check if a validator for this form was already created
+ // Check if a validator for this form was already created
var validator = $.data( this[ 0 ], "validator" );
if ( validator ) {
return validator;
@@ -41,40 +44,50 @@ $.extend($.fn, {
if ( validator.settings.onsubmit ) {
this.on( "click.validate", ":submit", function( event ) {
- if ( validator.settings.submitHandler ) {
- validator.submitButton = event.target;
- }
- // allow suppressing validation by adding a cancel class to the submit button
+ // Track the used submit button to properly handle scripted
+ // submits later.
+ validator.submitButton = event.currentTarget;
+
+ // Allow suppressing validation by adding a cancel class to the submit button
if ( $( this ).hasClass( "cancel" ) ) {
validator.cancelSubmit = true;
}
- // allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
+ // Allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
if ( $( this ).attr( "formnovalidate" ) !== undefined ) {
validator.cancelSubmit = true;
}
- });
+ } );
- // validate the form on submit
+ // Validate the form on submit
this.on( "submit.validate", function( event ) {
if ( validator.settings.debug ) {
- // prevent form submit to be able to see console output
+
+ // Prevent form submit to be able to see console output
event.preventDefault();
}
+
function handle() {
var hidden, result;
- if ( validator.settings.submitHandler ) {
- if ( validator.submitButton ) {
- // insert a hidden input as a replacement for the missing submit button
- hidden = $( "" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/bower.json b/src/Security/samples/PathSchemeSelection/bower.json
index bf55590ec5a4..c5d338ecc3db 100644
--- a/src/Security/samples/PathSchemeSelection/bower.json
+++ b/src/Security/samples/PathSchemeSelection/bower.json
@@ -4,7 +4,7 @@
"dependencies": {
"bootstrap": "3.4.0",
"jquery": "3.5.1",
- "jquery-validation": "1.14.0",
+ "jquery-validation": "1.19.5",
"jquery-validation-unobtrusive": "3.2.6"
}
}
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..e842c332996a 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,14 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
"_originalSource": "jquery-validation"
}
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA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d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json
index e3218a820ef1..711216051c4d 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/.bower.json
@@ -22,4 +22,4 @@
"_source": "git://github.com/jquery/jquery-dist.git",
"_target": "3.5.1",
"_originalSource": "jquery"
-}
\ No newline at end of file
+}
diff --git a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map
index cbe1012155ca..9a4ee2f9cc81 100644
--- a/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map
+++ b/src/Security/samples/PathSchemeSelection/wwwroot/lib/jquery/dist/jquery.min.map
@@ -1 +1 @@
-{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAaA,SAAYA,EAAQC,GAEnB,aAEuB,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAShDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,MAAM,IAAIE,MAAO,4CAElB,OAAOL,EAASI,IAGlBJ,EAASD,GAtBX,CA0BuB,oBAAXO,OAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAMtE,aAEA,IAAIC,EAAM,GAENC,EAAWC,OAAOC,eAElBC,EAAQJ,EAAII,MAEZC,EAAOL,EAAIK,KAAO,SAAUC,GAC/B,OAAON,EAAIK,KAAKE,KAAMD,IACnB,SAAUA,GACb,OAAON,EAAIQ,OAAOC,MAAO,GAAIH,IAI1BI,EAAOV,EAAIU,KAEXC,EAAUX,EAAIW,QAEdC,EAAa,GAEbC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,EAAaF,EAAOD,SAEpBI,E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BT,mBAAXoiC,QAAyBA,OAAOC,KAC3CD,OAAQ,SAAU,GAAI,WACrB,OAAOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
\ No newline at end of file
+{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","getProto","Object","getPrototypeOf","slice","flat","array","call","concat","apply","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","support","isFunction","obj","nodeType","isWindow","preservedScriptAttributes","type","src","nonce","noModule","DOMEval","code","node","doc","i","val","script","createElement","text","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","version","jQuery","selector","context","fn","init","isArrayLike","length","prototype","jquery","constructor","toArray","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","arguments","first","eq","last","even","grep","_elem","odd","len","j","end","sort","splice","extend","options","name","copy","copyIsArray","clone","target","deep","isPlainObject","Array","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","inArray","second","invert","matches","callbackExpect","arg","value","guid","Symbol","iterator","split","_i","toLowerCase","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","a","b","pop","pushNative","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","String","fromCharCode","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","nodeName","dir","next","childNodes","e","els","seed","m","nid","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","testContext","scope","toSelector","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","el","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","documentElement","hasCompare","subWindow","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","filter","attrId","find","getAttributeNode","tag","tmp","input","innerHTML","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","parent","useCache","lastChild","uniqueID","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","checked","selected","selectedIndex","empty","header","button","_matchIndexes","lt","gt","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","is","siblings","n","rneedsContext","rsingleTag","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","targets","l","closest","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","v","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","_","flag","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","always","deferred","catch","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","depth","special","that","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","setTimeout","stateString","when","singleValue","remaining","resolveContexts","resolveValues","master","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","toUpperCase","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","set","data","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","JSON","parse","removeData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","style","display","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","showHide","show","values","body","hide","toggle","div","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","option","wrapMap","thead","col","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","on","types","one","origFn","event","off","leverageNative","notAsync","saved","isTrigger","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","Event","handleObjIn","eventHandle","events","t","handleObj","handlers","namespaces","origType","elemData","create","handle","triggered","dispatch","bindType","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","addProp","hook","enumerable","originalEvent","writable","load","noBubble","click","beforeunload","returnValue","props","isDefaultPrevented","defaultPrevented","relatedTarget","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","ctrlKey","detail","eventPhase","metaKey","pageX","pageY","shiftKey","view","char","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","which","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","domManip","collection","hasScripts","iNoClone","valueIsFunction","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","original","insert","rnumnonpx","getStyles","opener","getComputedStyle","swap","old","rboxStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","container","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","marginLeft","right","pixelBoxStylesVal","boxSizingReliableVal","position","scrollboxSizeVal","offsetWidth","measure","round","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","height","parseInt","cssPrefixes","emptyStyle","vendorProps","finalPropName","final","cssProps","capName","vendorPropName","rdisplayswap","rcustomProp","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","subtract","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","ceil","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineHeight","order","orphans","widows","zIndex","zoom","origName","isCustomProp","setProperty","isFinite","getBoundingClientRect","scrollboxSizeBuggy","left","margin","padding","border","prefix","suffix","expand","expanded","parts","propHooks","run","percent","eased","duration","pos","step","fx","scrollTop","scrollLeft","linear","p","swing","cos","PI","fxNow","inProgress","opt","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","animation","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","complete","timer","anim","*","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","radioValue","boolHook","removeAttr","nType","attrHooks","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","for","class","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","isValidValue","classNames","hasClass","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","s","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","hasContent","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","throws","ajaxConvert","getJSON","getScript","text script","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","offsetHeight","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","createHTMLDocument","implementation","keepScripts","parsed","params","animated","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","using","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","unbind","delegate","undelegate","hover","fnOver","fnOut","proxy","holdReady","hold","parseJSON","isNumeric","isNaN","trim","define","amd","_jQuery","_$","$","noConflict"],"mapp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GiE,KAAOjE,EAAGiE,MAAQpE,EAAOoE,OAElCykC,GAGR7oC,EAAO8oC,UAAY,SAAUC,GACvBA,EACJ/oC,EAAOge,YAEPhe,EAAO4X,OAAO,IAGhB5X,EAAO6C,QAAUD,MAAMC,QACvB7C,EAAOgpC,UAAY/oB,KAAKC,MACxBlgB,EAAOqJ,SAAWA,EAClBrJ,EAAO1B,WAAaA,EACpB0B,EAAOvB,SAAWA,EAClBuB,EAAOgf,UAAYA,EACnBhf,EAAOrB,KAAOmB,EAEdE,EAAOqpB,IAAM3jB,KAAK2jB,IAElBrpB,EAAOipC,UAAY,SAAU1qC,GAK5B,IAAII,EAAOqB,EAAOrB,KAAMJ,GACxB,OAAkB,WAATI,GAA8B,WAATA,KAK5BuqC,MAAO3qC,EAAM0xB,WAAY1xB,KAG5ByB,EAAOmpC,KAAO,SAAU5pC,GACvB,OAAe,MAARA,EACN,IACEA,EAAO,IAAK2D,QAAS8D,GAAO,KAkBT,mBAAXoiC,QAAyBA,OAAOC,KAC3CD,OAAQ,SAAU,GAAI,WACrB,OAAOppC,IAOT,IAGCspC,GAAUtsC,EAAOgD,OAGjBupC,GAAKvsC,EAAOwsC,EAwBb,OAtBAxpC,EAAOypC,WAAa,SAAU/mC,GAS7B,OARK1F,EAAOwsC,IAAMxpC,IACjBhD,EAAOwsC,EAAID,IAGP7mC,GAAQ1F,EAAOgD,SAAWA,IAC9BhD,EAAOgD,OAASspC,IAGVtpC,GAMiB,oBAAb9C,IACXF,EAAOgD,OAAShD,EAAOwsC,EAAIxpC,GAMrBA","file":"jquery.min.js"}
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json
index cab34a4a61ec..4c51b65cfe56 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/.bower.json
@@ -1,9 +1,9 @@
{
"name": "jquery-validation",
- "homepage": "http://jqueryvalidation.org/",
+ "homepage": "https://jqueryvalidation.org/",
"repository": {
"type": "git",
- "url": "git://github.com/jzaefferer/jquery-validation.git"
+ "url": "git://github.com/jquery-validation/jquery-validation.git"
},
"authors": [
"Jörn Zaefferer "
@@ -27,14 +27,15 @@
"dependencies": {
"jquery": ">= 1.7.2"
},
- "version": "1.14.0",
- "_release": "1.14.0",
+ "version": "1.19.5",
+ "_release": "1.19.5",
"_resolution": {
"type": "version",
- "tag": "1.14.0",
- "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
+ "tag": "1.19.5",
+ "commit": "5907740ce2492338606dbbdbd13d244a8d545097"
},
- "_source": "git://github.com/jzaefferer/jquery-validation.git",
- "_target": ">=1.8",
- "_originalSource": "jquery-validation"
+ "_source": "https://github.com/jzaefferer/jquery-validation.git",
+ "_target": "1.19.5",
+ "_originalSource": "jquery-validation",
+ "_direct": true
}
\ No newline at end of file
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js
index df41fbd403db..c6a7229185ab 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.js
@@ -1,67 +1,111 @@
/*!
- * jQuery Validation Plugin v1.14.0
+ * jQuery Validation Plugin v1.19.5
*
- * http://jqueryvalidation.org/
+ * https://jqueryvalidation.org/
*
- * Copyright (c) 2015 Jörn Zaefferer
+ * Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
define( ["jquery", "./jquery.validate"], factory );
+ } else if (typeof module === "object" && module.exports) {
+ module.exports = factory( require( "jquery" ) );
} else {
factory( jQuery );
}
}(function( $ ) {
-(function() {
+( function() {
- function stripHtml(value) {
- // remove html tags and space chars
- return value.replace(/<.[^<>]*?>/g, " ").replace(/ | /gi, " ")
- // remove punctuation
- .replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "");
+ function stripHtml( value ) {
+
+ // Remove html tags and space chars
+ return value.replace( /<.[^<>]*?>/g, " " ).replace( / | /gi, " " )
+
+ // Remove punctuation
+ .replace( /[.(),;:!?%#$'\"_+=\/\-“”’]*/g, "" );
}
- $.validator.addMethod("maxWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length <= params;
- }, $.validator.format("Please enter {0} words or less."));
+ $.validator.addMethod( "maxWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length <= params;
+ }, $.validator.format( "Please enter {0} words or less." ) );
- $.validator.addMethod("minWords", function(value, element, params) {
- return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params;
- }, $.validator.format("Please enter at least {0} words."));
+ $.validator.addMethod( "minWords", function( value, element, params ) {
+ return this.optional( element ) || stripHtml( value ).match( /\b\w+\b/g ).length >= params;
+ }, $.validator.format( "Please enter at least {0} words." ) );
- $.validator.addMethod("rangeWords", function(value, element, params) {
- var valueStripped = stripHtml(value),
+ $.validator.addMethod( "rangeWords", function( value, element, params ) {
+ var valueStripped = stripHtml( value ),
regex = /\b\w+\b/g;
- return this.optional(element) || valueStripped.match(regex).length >= params[0] && valueStripped.match(regex).length <= params[1];
- }, $.validator.format("Please enter between {0} and {1} words."));
+ return this.optional( element ) || valueStripped.match( regex ).length >= params[ 0 ] && valueStripped.match( regex ).length <= params[ 1 ];
+ }, $.validator.format( "Please enter between {0} and {1} words." ) );
+
+}() );
-}());
+/**
+ * This is used in the United States to process payments, deposits,
+ * or transfers using the Automated Clearing House (ACH) or Fedwire
+ * systems. A very common use case would be to validate a form for
+ * an ACH bill payment.
+ */
+$.validator.addMethod( "abaRoutingNumber", function( value ) {
+ var checksum = 0;
+ var tokens = value.split( "" );
+ var length = tokens.length;
+
+ // Length Check
+ if ( length !== 9 ) {
+ return false;
+ }
+
+ // Calc the checksum
+ // https://en.wikipedia.org/wiki/ABA_routing_transit_number
+ for ( var i = 0; i < length; i += 3 ) {
+ checksum += parseInt( tokens[ i ], 10 ) * 3 +
+ parseInt( tokens[ i + 1 ], 10 ) * 7 +
+ parseInt( tokens[ i + 2 ], 10 );
+ }
+
+ // If not zero and divisible by 10 then valid
+ if ( checksum !== 0 && checksum % 10 === 0 ) {
+ return true;
+ }
+
+ return false;
+}, "Please enter a valid routing number." );
// Accept a value from a file input based on a required mimetype
-$.validator.addMethod("accept", function(value, element, param) {
+$.validator.addMethod( "accept", function( value, element, param ) {
+
// Split mime on commas in case we have multiple types we can accept
- var typeParam = typeof param === "string" ? param.replace(/\s/g, "").replace(/,/g, "|") : "image/*",
- optionalValue = this.optional(element),
- i, file;
+ var typeParam = typeof param === "string" ? param.replace( /\s/g, "" ) : "image/*",
+ optionalValue = this.optional( element ),
+ i, file, regex;
// Element is optional
- if (optionalValue) {
+ if ( optionalValue ) {
return optionalValue;
}
- if ($(element).attr("type") === "file") {
- // If we are using a wildcard, make it regex friendly
- typeParam = typeParam.replace(/\*/g, ".*");
+ if ( $( element ).attr( "type" ) === "file" ) {
+
+ // Escape string to be used in the regex
+ // see: https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
+ // Escape also "/*" as "/.*" as a wildcard
+ typeParam = typeParam
+ .replace( /[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&" )
+ .replace( /,/g, "|" )
+ .replace( /\/\*/g, "/.*" );
// Check if the element has a FileList before checking each file
- if (element.files && element.files.length) {
- for (i = 0; i < element.files.length; i++) {
- file = element.files[i];
+ if ( element.files && element.files.length ) {
+ regex = new RegExp( ".?(" + typeParam + ")$", "i" );
+ for ( i = 0; i < element.files.length; i++ ) {
+ file = element.files[ i ];
// Grab the mimetype from the loaded file, verify it matches
- if (!file.type.match(new RegExp( "\\.?(" + typeParam + ")$", "i"))) {
+ if ( !file.type.match( regex ) ) {
return false;
}
}
@@ -71,11 +115,11 @@ $.validator.addMethod("accept", function(value, element, param) {
// Either return true because we've validated each file, or because the
// browser does not support element.files and the FileList feature
return true;
-}, $.validator.format("Please enter a value with a valid mimetype."));
+}, $.validator.format( "Please enter a value with a valid mimetype." ) );
-$.validator.addMethod("alphanumeric", function(value, element) {
- return this.optional(element) || /^\w+$/i.test(value);
-}, "Letters, numbers, and underscores only please");
+$.validator.addMethod( "alphanumeric", function( value, element ) {
+ return this.optional( element ) || /^\w+$/i.test( value );
+}, "Letters, numbers, and underscores only please." );
/*
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -83,138 +127,327 @@ $.validator.addMethod("alphanumeric", function(value, element) {
* We accept the notation with spaces, as that is common.
* acceptable: 123456789 or 12 34 56 789
*/
-$.validator.addMethod("bankaccountNL", function(value, element) {
- if (this.optional(element)) {
+$.validator.addMethod( "bankaccountNL", function( value, element ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (!(/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(value))) {
+ if ( !( /^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test( value ) ) ) {
return false;
}
- // now '11 check'
- var account = value.replace(/ /g, ""), // remove spaces
+
+ // Now '11 check'
+ var account = value.replace( / /g, "" ), // Remove spaces
sum = 0,
len = account.length,
pos, factor, digit;
for ( pos = 0; pos < len; pos++ ) {
factor = len - pos;
- digit = account.substring(pos, pos + 1);
+ digit = account.substring( pos, pos + 1 );
sum = sum + factor * digit;
}
return sum % 11 === 0;
-}, "Please specify a valid bank account number");
+}, "Please specify a valid bank account number." );
-$.validator.addMethod("bankorgiroaccountNL", function(value, element) {
- return this.optional(element) ||
- ($.validator.methods.bankaccountNL.call(this, value, element)) ||
- ($.validator.methods.giroaccountNL.call(this, value, element));
-}, "Please specify a valid bank or giro account number");
+$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
+ return this.optional( element ) ||
+ ( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
+ ( $.validator.methods.giroaccountNL.call( this, value, element ) );
+}, "Please specify a valid bank or giro account number." );
/**
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
*
* BIC pattern: BBBBCCLLbbb (8 or 11 characters long; bbb is optional)
*
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
+ *
* BIC definition in detail:
* - First 4 characters - bank code (only letters)
* - Next 2 characters - ISO 3166-1 alpha-2 country code (only letters)
* - Next 2 characters - location code (letters and digits)
* a. shall not start with '0' or '1'
- * b. second character must be a letter ('O' is not allowed) or one of the following digits ('0' for test (therefore not allowed), '1' for passive participant and '2' for active participant)
+ * b. second character must be a letter ('O' is not allowed) or digit ('0' for test (therefore not allowed), '1' denoting passive participant, '2' typically reverse-billing)
* - Last 3 characters - branch code, optional (shall not start with 'X' except in case of 'XXX' for primary office) (letters and digits)
*/
-$.validator.addMethod("bic", function(value, element) {
- return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value );
-}, "Please specify a valid BIC code");
+$.validator.addMethod( "bic", function( value, element ) {
+ return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
+}, "Please specify a valid BIC code." );
/*
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
* Further rules can be found in Spanish on http://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal
+ *
+ * Spanish CIF structure:
+ *
+ * [ T ][ P ][ P ][ N ][ N ][ N ][ N ][ N ][ C ]
+ *
+ * Where:
+ *
+ * T: 1 character. Kind of Organization Letter: [ABCDEFGHJKLMNPQRSUVW]
+ * P: 2 characters. Province.
+ * N: 5 characters. Secuencial Number within the province.
+ * C: 1 character. Control Digit: [0-9A-J].
+ *
+ * [ T ]: Kind of Organizations. Possible values:
+ *
+ * A. Corporations
+ * B. LLCs
+ * C. General partnerships
+ * D. Companies limited partnerships
+ * E. Communities of goods
+ * F. Cooperative Societies
+ * G. Associations
+ * H. Communities of homeowners in horizontal property regime
+ * J. Civil Societies
+ * K. Old format
+ * L. Old format
+ * M. Old format
+ * N. Nonresident entities
+ * P. Local authorities
+ * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
+ * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
+ * S. Organs of State Administration and regions
+ * V. Agrarian Transformation
+ * W. Permanent establishments of non-resident in Spain
+ *
+ * [ C ]: Control Digit. It can be a number or a letter depending on T value:
+ * [ T ] --> [ C ]
+ * ------ ----------
+ * A Number
+ * B Number
+ * E Number
+ * H Number
+ * K Letter
+ * P Letter
+ * Q Letter
+ * S Letter
+ *
*/
-$.validator.addMethod( "cifES", function( value ) {
+$.validator.addMethod( "cifES", function( value, element ) {
"use strict";
- var num = [],
- controlDigit, sum, i, count, tmp, secondDigit;
+ if ( this.optional( element ) ) {
+ return true;
+ }
- value = value.toUpperCase();
+ var cifRegEx = new RegExp( /^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi );
+ var letter = value.substring( 0, 1 ), // [ T ]
+ number = value.substring( 1, 8 ), // [ P ][ P ][ N ][ N ][ N ][ N ][ N ]
+ control = value.substring( 8, 9 ), // [ C ]
+ all_sum = 0,
+ even_sum = 0,
+ odd_sum = 0,
+ i, n,
+ control_digit,
+ control_letter;
+
+ function isOdd( n ) {
+ return n % 2 === 0;
+ }
// Quick format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ if ( value.length !== 9 || !cifRegEx.test( value ) ) {
return false;
}
- for ( i = 0; i < 9; i++ ) {
- num[ i ] = parseInt( value.charAt( i ), 10 );
- }
-
- // Algorithm for checking CIF codes
- sum = num[ 2 ] + num[ 4 ] + num[ 6 ];
- for ( count = 1; count < 8; count += 2 ) {
- tmp = ( 2 * num[ count ] ).toString();
- secondDigit = tmp.charAt( 1 );
-
- sum += parseInt( tmp.charAt( 0 ), 10 ) + ( secondDigit === "" ? 0 : parseInt( secondDigit, 10 ) );
- }
-
- /* The first (position 1) is a letter following the following criteria:
- * A. Corporations
- * B. LLCs
- * C. General partnerships
- * D. Companies limited partnerships
- * E. Communities of goods
- * F. Cooperative Societies
- * G. Associations
- * H. Communities of homeowners in horizontal property regime
- * J. Civil Societies
- * K. Old format
- * L. Old format
- * M. Old format
- * N. Nonresident entities
- * P. Local authorities
- * Q. Autonomous bodies, state or not, and the like, and congregations and religious institutions
- * R. Congregations and religious institutions (since 2008 ORDER EHA/451/2008)
- * S. Organs of State Administration and regions
- * V. Agrarian Transformation
- * W. Permanent establishments of non-resident in Spain
- */
- if ( /^[ABCDEFGHJNPQRSUVW]{1}/.test( value ) ) {
- sum += "";
- controlDigit = 10 - parseInt( sum.charAt( sum.length - 1 ), 10 );
- value += controlDigit;
- return ( num[ 8 ].toString() === String.fromCharCode( 64 + controlDigit ) || num[ 8 ].toString() === value.charAt( value.length - 1 ) );
+ for ( i = 0; i < number.length; i++ ) {
+ n = parseInt( number[ i ], 10 );
+
+ // Odd positions
+ if ( isOdd( i ) ) {
+
+ // Odd positions are multiplied first.
+ n *= 2;
+
+ // If the multiplication is bigger than 10 we need to adjust
+ odd_sum += n < 10 ? n : n - 9;
+
+ // Even positions
+ // Just sum them
+ } else {
+ even_sum += n;
+ }
+ }
+
+ all_sum = even_sum + odd_sum;
+ control_digit = ( 10 - ( all_sum ).toString().substr( -1 ) ).toString();
+ control_digit = parseInt( control_digit, 10 ) > 9 ? "0" : control_digit;
+ control_letter = "JABCDEFGHI".substr( control_digit, 1 ).toString();
+
+ // Control must be a digit
+ if ( letter.match( /[ABEH]/ ) ) {
+ return control === control_digit;
+
+ // Control must be a letter
+ } else if ( letter.match( /[KPQS]/ ) ) {
+ return control === control_letter;
}
- return false;
+ // Can be either
+ return control === control_digit || control === control_letter;
}, "Please specify a valid CIF number." );
+/*
+ * Brazillian CNH number (Carteira Nacional de Habilitacao) is the License Driver number.
+ * CNH numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnhBR", function( value ) {
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ var sum = 0, dsc = 0, firstChar,
+ firstCN, secondCN, i, j, v;
+
+ firstChar = value.charAt( 0 );
+
+ if ( new Array( 12 ).join( firstChar ) === value ) {
+ return false;
+ }
+
+ // Step 1 - using first Check Number:
+ for ( i = 0, j = 9, v = 0; i < 9; ++i, --j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ firstCN = sum % 11;
+ if ( firstCN >= 10 ) {
+ firstCN = 0;
+ dsc = 2;
+ }
+
+ sum = 0;
+ for ( i = 0, j = 1, v = 0; i < 9; ++i, ++j ) {
+ sum += +( value.charAt( i ) * j );
+ }
+
+ secondCN = sum % 11;
+ if ( secondCN >= 10 ) {
+ secondCN = 0;
+ } else {
+ secondCN = secondCN - dsc;
+ }
+
+ return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
+
+}, "Please specify a valid CNH number." );
+
+/*
+ * Brazillian value number (Cadastrado de Pessoas Juridica).
+ * value numbers have 14 digits in total: 12 numbers followed by 2 check numbers that are being used for validation.
+ */
+$.validator.addMethod( "cnpjBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ // Removing no number
+ value = value.replace( /[^\d]+/g, "" );
+
+ // Checking value to have 14 digits only
+ if ( value.length !== 14 ) {
+ return false;
+ }
+
+ // Elimina values invalidos conhecidos
+ if ( value === "00000000000000" ||
+ value === "11111111111111" ||
+ value === "22222222222222" ||
+ value === "33333333333333" ||
+ value === "44444444444444" ||
+ value === "55555555555555" ||
+ value === "66666666666666" ||
+ value === "77777777777777" ||
+ value === "88888888888888" ||
+ value === "99999999999999" ) {
+ return false;
+ }
+
+ // Valida DVs
+ var tamanho = ( value.length - 2 );
+ var numeros = value.substring( 0, tamanho );
+ var digitos = value.substring( tamanho );
+ var soma = 0;
+ var pos = tamanho - 7;
+
+ for ( var i = tamanho; i >= 1; i-- ) {
+ soma += numeros.charAt( tamanho - i ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 0 ), 10 ) ) {
+ return false;
+ }
+
+ tamanho = tamanho + 1;
+ numeros = value.substring( 0, tamanho );
+ soma = 0;
+ pos = tamanho - 7;
+
+ for ( var il = tamanho; il >= 1; il-- ) {
+ soma += numeros.charAt( tamanho - il ) * pos--;
+ if ( pos < 2 ) {
+ pos = 9;
+ }
+ }
+
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
+
+ if ( resultado !== parseInt( digitos.charAt( 1 ), 10 ) ) {
+ return false;
+ }
+
+ return true;
+
+}, "Please specify a CNPJ value number." );
+
/*
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
* CPF numbers have 11 digits in total: 9 numbers followed by 2 check numbers that are being used for validation.
*/
-$.validator.addMethod("cpfBR", function(value) {
+$.validator.addMethod( "cpfBR", function( value, element ) {
+ "use strict";
+
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
// Removing special characters from value
- value = value.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "");
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
// Checking value to have 11 digits only
- if (value.length !== 11) {
+ if ( value.length !== 11 ) {
return false;
}
var sum = 0,
firstCN, secondCN, checkResult, i;
- firstCN = parseInt(value.substring(9, 10), 10);
- secondCN = parseInt(value.substring(10, 11), 10);
+ firstCN = parseInt( value.substring( 9, 10 ), 10 );
+ secondCN = parseInt( value.substring( 10, 11 ), 10 );
- checkResult = function(sum, cn) {
- var result = (sum * 10) % 11;
- if ((result === 10) || (result === 11)) {result = 0;}
- return (result === cn);
+ checkResult = function( sum, cn ) {
+ var result = ( sum * 10 ) % 11;
+ if ( ( result === 10 ) || ( result === 11 ) ) {
+ result = 0;
+ }
+ return ( result === cn );
};
// Checking for dump data
- if (value === "" ||
+ if ( value === "" ||
value === "00000000000" ||
value === "11111111111" ||
value === "22222222222" ||
@@ -231,90 +464,131 @@ $.validator.addMethod("cpfBR", function(value) {
// Step 1 - using first Check Number:
for ( i = 1; i <= 9; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (11 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 11 - i );
}
// If first Check Number (CN) is valid, move to Step 2 - using second Check Number:
- if ( checkResult(sum, firstCN) ) {
+ if ( checkResult( sum, firstCN ) ) {
sum = 0;
for ( i = 1; i <= 10; i++ ) {
- sum = sum + parseInt(value.substring(i - 1, i), 10) * (12 - i);
+ sum = sum + parseInt( value.substring( i - 1, i ), 10 ) * ( 12 - i );
}
- return checkResult(sum, secondCN);
+ return checkResult( sum, secondCN );
}
return false;
-}, "Please specify a valid CPF number");
+}, "Please specify a valid CPF number." );
+
+// https://jqueryvalidation.org/creditcard-method/
+// based on https://en.wikipedia.org/wiki/Luhn_algorithm
+$.validator.addMethod( "creditcard", function( value, element ) {
+ if ( this.optional( element ) ) {
+ return "dependency-mismatch";
+ }
+
+ // Accept only spaces, digits and dashes
+ if ( /[^0-9 \-]+/.test( value ) ) {
+ return false;
+ }
+
+ var nCheck = 0,
+ nDigit = 0,
+ bEven = false,
+ n, cDigit;
+
+ value = value.replace( /\D/g, "" );
+
+ // Basing min and max length on
+ // https://dev.ean.com/general-info/valid-card-types/
+ if ( value.length < 13 || value.length > 19 ) {
+ return false;
+ }
+
+ for ( n = value.length - 1; n >= 0; n-- ) {
+ cDigit = value.charAt( n );
+ nDigit = parseInt( cDigit, 10 );
+ if ( bEven ) {
+ if ( ( nDigit *= 2 ) > 9 ) {
+ nDigit -= 9;
+ }
+ }
+
+ nCheck += nDigit;
+ bEven = !bEven;
+ }
+
+ return ( nCheck % 10 ) === 0;
+}, "Please enter a valid credit card number." );
/* NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator
- * Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
+ * Redistributed under the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0
* Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings)
*/
-$.validator.addMethod("creditcardtypes", function(value, element, param) {
- if (/[^0-9\-]+/.test(value)) {
+$.validator.addMethod( "creditcardtypes", function( value, element, param ) {
+ if ( /[^0-9\-]+/.test( value ) ) {
return false;
}
- value = value.replace(/\D/g, "");
+ value = value.replace( /\D/g, "" );
var validTypes = 0x0000;
- if (param.mastercard) {
+ if ( param.mastercard ) {
validTypes |= 0x0001;
}
- if (param.visa) {
+ if ( param.visa ) {
validTypes |= 0x0002;
}
- if (param.amex) {
+ if ( param.amex ) {
validTypes |= 0x0004;
}
- if (param.dinersclub) {
+ if ( param.dinersclub ) {
validTypes |= 0x0008;
}
- if (param.enroute) {
+ if ( param.enroute ) {
validTypes |= 0x0010;
}
- if (param.discover) {
+ if ( param.discover ) {
validTypes |= 0x0020;
}
- if (param.jcb) {
+ if ( param.jcb ) {
validTypes |= 0x0040;
}
- if (param.unknown) {
+ if ( param.unknown ) {
validTypes |= 0x0080;
}
- if (param.all) {
+ if ( param.all ) {
validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080;
}
- if (validTypes & 0x0001 && /^(5[12345])/.test(value)) { //mastercard
+ if ( validTypes & 0x0001 && ( /^(5[12345])/.test( value ) || /^(2[234567])/.test( value ) ) ) { // Mastercard
return value.length === 16;
}
- if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa
+ if ( validTypes & 0x0002 && /^(4)/.test( value ) ) { // Visa
return value.length === 16;
}
- if (validTypes & 0x0004 && /^(3[47])/.test(value)) { //amex
+ if ( validTypes & 0x0004 && /^(3[47])/.test( value ) ) { // Amex
return value.length === 15;
}
- if (validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test(value)) { //dinersclub
+ if ( validTypes & 0x0008 && /^(3(0[012345]|[68]))/.test( value ) ) { // Dinersclub
return value.length === 14;
}
- if (validTypes & 0x0010 && /^(2(014|149))/.test(value)) { //enroute
+ if ( validTypes & 0x0010 && /^(2(014|149))/.test( value ) ) { // Enroute
return value.length === 15;
}
- if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover
+ if ( validTypes & 0x0020 && /^(6011)/.test( value ) ) { // Discover
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(3)/.test( value ) ) { // Jcb
return value.length === 16;
}
- if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb
+ if ( validTypes & 0x0040 && /^(2131|1800)/.test( value ) ) { // Jcb
return value.length === 15;
}
- if (validTypes & 0x0080) { //unknown
+ if ( validTypes & 0x0080 ) { // Unknown
return true;
}
return false;
-}, "Please enter a valid credit card number.");
+}, "Please enter a valid credit card number." );
/**
* Validates currencies with any given symbols by @jameslouiz
@@ -344,23 +618,23 @@ $.validator.addMethod("creditcardtypes", function(value, element, param) {
* currency: "$,£,¢"
* }
*/
-$.validator.addMethod("currency", function(value, element, param) {
+$.validator.addMethod( "currency", function( value, element, param ) {
var isParamString = typeof param === "string",
- symbol = isParamString ? param : param[0],
- soft = isParamString ? true : param[1],
+ symbol = isParamString ? param : param[ 0 ],
+ soft = isParamString ? true : param[ 1 ],
regex;
- symbol = symbol.replace(/,/g, "");
+ symbol = symbol.replace( /,/g, "" );
symbol = soft ? symbol + "]" : symbol + "]?";
regex = "^[" + symbol + "([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$";
- regex = new RegExp(regex);
- return this.optional(element) || regex.test(value);
+ regex = new RegExp( regex );
+ return this.optional( element ) || regex.test( value );
-}, "Please specify a valid currency");
+}, "Please specify a valid currency." );
-$.validator.addMethod("dateFA", function(value, element) {
- return this.optional(element) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateFA", function( value, element ) {
+ return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
+}, $.validator.messages.date );
/**
* Return true, if the value is a valid date, also making this formal check dd/mm/yyyy.
@@ -381,17 +655,17 @@ $.validator.addMethod("dateFA", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("dateITA", function(value, element) {
+$.validator.addMethod( "dateITA", function( value, element ) {
var check = false,
re = /^\d{1,2}\/\d{1,2}\/\d{4}$/,
adata, gg, mm, aaaa, xdata;
- if ( re.test(value)) {
- adata = value.split("/");
- gg = parseInt(adata[0], 10);
- mm = parseInt(adata[1], 10);
- aaaa = parseInt(adata[2], 10);
- xdata = new Date(Date.UTC(aaaa, mm - 1, gg, 12, 0, 0, 0));
- if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth () === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
+ if ( re.test( value ) ) {
+ adata = value.split( "/" );
+ gg = parseInt( adata[ 0 ], 10 );
+ mm = parseInt( adata[ 1 ], 10 );
+ aaaa = parseInt( adata[ 2 ], 10 );
+ xdata = new Date( Date.UTC( aaaa, mm - 1, gg, 12, 0, 0, 0 ) );
+ if ( ( xdata.getUTCFullYear() === aaaa ) && ( xdata.getUTCMonth() === mm - 1 ) && ( xdata.getUTCDate() === gg ) ) {
check = true;
} else {
check = false;
@@ -399,46 +673,83 @@ $.validator.addMethod("dateITA", function(value, element) {
} else {
check = false;
}
- return this.optional(element) || check;
-}, $.validator.messages.date);
+ return this.optional( element ) || check;
+}, $.validator.messages.date );
-$.validator.addMethod("dateNL", function(value, element) {
- return this.optional(element) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(value);
-}, $.validator.messages.date);
+$.validator.addMethod( "dateNL", function( value, element ) {
+ return this.optional( element ) || /^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test( value );
+}, $.validator.messages.date );
// Older "accept" file extension method. Old docs: http://docs.jquery.com/Plugins/Validation/Methods/accept
-$.validator.addMethod("extension", function(value, element, param) {
- param = typeof param === "string" ? param.replace(/,/g, "|") : "png|jpe?g|gif";
- return this.optional(element) || value.match(new RegExp("\\.(" + param + ")$", "i"));
-}, $.validator.format("Please enter a value with a valid extension."));
+$.validator.addMethod( "extension", function( value, element, param ) {
+ param = typeof param === "string" ? param.replace( /,/g, "|" ) : "png|jpe?g|gif";
+ return this.optional( element ) || value.match( new RegExp( "\\.(" + param + ")$", "i" ) );
+}, $.validator.format( "Please enter a value with a valid extension." ) );
/**
* Dutch giro account numbers (not bank numbers) have max 7 digits
*/
-$.validator.addMethod("giroaccountNL", function(value, element) {
- return this.optional(element) || /^[0-9]{1,7}$/.test(value);
-}, "Please specify a valid giro account number");
+$.validator.addMethod( "giroaccountNL", function( value, element ) {
+ return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
+}, "Please specify a valid giro account number." );
+
+$.validator.addMethod( "greaterThan", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThan-blur" ).length ) {
+ target.addClass( "validate-greaterThan-blur" ).on( "blur.validate-greaterThan", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value > target.val();
+}, "Please enter a greater value." );
+
+$.validator.addMethod( "greaterThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-greaterThanEqual-blur" ).length ) {
+ target.addClass( "validate-greaterThanEqual-blur" ).on( "blur.validate-greaterThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value >= target.val();
+}, "Please enter a greater value." );
/**
* IBAN is the international bank account number.
* It has a country - specific format, that is checked here too
+ *
+ * Validation is case-insensitive. Please make sure to normalize input yourself.
*/
-$.validator.addMethod("iban", function(value, element) {
- // some quick simple tests to prevent needless work
- if (this.optional(element)) {
+$.validator.addMethod( "iban", function( value, element ) {
+
+ // Some quick simple tests to prevent needless work
+ if ( this.optional( element ) ) {
return true;
}
- // remove spaces and to upper case
- var iban = value.replace(/ /g, "").toUpperCase(),
+ // Remove spaces and to upper case
+ var iban = value.replace( / /g, "" ).toUpperCase(),
ibancheckdigits = "",
leadingZeroes = true,
cRest = "",
cOperator = "",
countrycode, ibancheck, charAt, cChar, bbanpattern, bbancountrypatterns, ibanregexp, i, p;
- // check the country code and find the country specific format
- countrycode = iban.substring(0, 2);
+ // Check for IBAN code length.
+ // It contains:
+ // country code ISO 3166-1 - two letters,
+ // two check digits,
+ // Basic Bank Account Number (BBAN) - up to 30 chars
+ var minimalIBANlength = 5;
+ if ( iban.length < minimalIBANlength ) {
+ return false;
+ }
+
+ // Check the country code and find the country specific format
+ countrycode = iban.substring( 0, 2 );
bbancountrypatterns = {
"AL": "\\d{8}[\\dA-Z]{16}",
"AD": "\\d{8}[\\dA-Z]{12}",
@@ -506,7 +817,8 @@ $.validator.addMethod("iban", function(value, element) {
"VG": "[\\dA-Z]{4}\\d{16}"
};
- bbanpattern = bbancountrypatterns[countrycode];
+ bbanpattern = bbancountrypatterns[ countrycode ];
+
// As new countries will start using IBAN in the
// future, we only check if the countrycode is known.
// This prevents false negatives, while almost all
@@ -514,57 +826,143 @@ $.validator.addMethod("iban", function(value, element) {
// by the checksum validation below anyway.
// Strict checking should return FALSE for unknown
// countries.
- if (typeof bbanpattern !== "undefined") {
- ibanregexp = new RegExp("^[A-Z]{2}\\d{2}" + bbanpattern + "$", "");
- if (!(ibanregexp.test(iban))) {
- return false; // invalid country specific format
+ if ( typeof bbanpattern !== "undefined" ) {
+ ibanregexp = new RegExp( "^[A-Z]{2}\\d{2}" + bbanpattern + "$", "" );
+ if ( !( ibanregexp.test( iban ) ) ) {
+ return false; // Invalid country specific format
}
}
- // now check the checksum, first convert to digits
- ibancheck = iban.substring(4, iban.length) + iban.substring(0, 4);
- for (i = 0; i < ibancheck.length; i++) {
- charAt = ibancheck.charAt(i);
- if (charAt !== "0") {
+ // Now check the checksum, first convert to digits
+ ibancheck = iban.substring( 4, iban.length ) + iban.substring( 0, 4 );
+ for ( i = 0; i < ibancheck.length; i++ ) {
+ charAt = ibancheck.charAt( i );
+ if ( charAt !== "0" ) {
leadingZeroes = false;
}
- if (!leadingZeroes) {
- ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(charAt);
+ if ( !leadingZeroes ) {
+ ibancheckdigits += "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf( charAt );
}
}
- // calculate the result of: ibancheckdigits % 97
- for (p = 0; p < ibancheckdigits.length; p++) {
- cChar = ibancheckdigits.charAt(p);
+ // Calculate the result of: ibancheckdigits % 97
+ for ( p = 0; p < ibancheckdigits.length; p++ ) {
+ cChar = ibancheckdigits.charAt( p );
cOperator = "" + cRest + "" + cChar;
cRest = cOperator % 97;
}
return cRest === 1;
-}, "Please specify a valid IBAN");
+}, "Please specify a valid IBAN." );
-$.validator.addMethod("integer", function(value, element) {
- return this.optional(element) || /^-?\d+$/.test(value);
-}, "A positive or negative non-decimal number please");
+$.validator.addMethod( "integer", function( value, element ) {
+ return this.optional( element ) || /^-?\d+$/.test( value );
+}, "A positive or negative non-decimal number please." );
-$.validator.addMethod("ipv4", function(value, element) {
- return this.optional(element) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(value);
-}, "Please enter a valid IP v4 address.");
+$.validator.addMethod( "ipv4", function( value, element ) {
+ return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
+}, "Please enter a valid IP v4 address." );
-$.validator.addMethod("ipv6", function(value, element) {
- return this.optional(element) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);
-}, "Please enter a valid IP v6 address.");
+$.validator.addMethod( "ipv6", function( value, element ) {
+ return this.optional( element ) || /^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test( value );
+}, "Please enter a valid IP v6 address." );
-$.validator.addMethod("lettersonly", function(value, element) {
- return this.optional(element) || /^[a-z]+$/i.test(value);
-}, "Letters only please");
+$.validator.addMethod( "lessThan", function( value, element, param ) {
+ var target = $( param );
-$.validator.addMethod("letterswithbasicpunc", function(value, element) {
- return this.optional(element) || /^[a-z\-.,()'"\s]+$/i.test(value);
-}, "Letters or punctuation only please");
+ if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
+ target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
+ $( element ).valid();
+ } );
+ }
-$.validator.addMethod("mobileNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid mobile number");
+ return value < target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lessThanEqual", function( value, element, param ) {
+ var target = $( param );
+
+ if ( this.settings.onfocusout && target.not( ".validate-lessThanEqual-blur" ).length ) {
+ target.addClass( "validate-lessThanEqual-blur" ).on( "blur.validate-lessThanEqual", function() {
+ $( element ).valid();
+ } );
+ }
+
+ return value <= target.val();
+}, "Please enter a lesser value." );
+
+$.validator.addMethod( "lettersonly", function( value, element ) {
+ return this.optional( element ) || /^[a-z]+$/i.test( value );
+}, "Letters only please." );
+
+$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
+ return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
+}, "Letters or punctuation only please." );
+
+// Limit the number of files in a FileList.
+$.validator.addMethod( "maxfiles", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length > param ) {
+ return false;
+ }
+ }
+
+ return true;
+}, $.validator.format( "Please select no more than {0} files." ) );
+
+// Limit the size of each individual file in a FileList.
+$.validator.addMethod( "maxsize", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ for ( var i = 0; i < element.files.length; i++ ) {
+ if ( element.files[ i ].size > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "File size must not exceed {0} bytes each." ) );
+
+// Limit the size of all files in a FileList.
+$.validator.addMethod( "maxsizetotal", function( value, element, param ) {
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
+ if ( $( element ).attr( "type" ) === "file" ) {
+ if ( element.files && element.files.length ) {
+ var totalSize = 0;
+
+ for ( var i = 0; i < element.files.length; i++ ) {
+ totalSize += element.files[ i ].size;
+ if ( totalSize > param ) {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+}, $.validator.format( "Total size of all files must not exceed {0} bytes." ) );
+
+
+$.validator.addMethod( "mobileNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "mobileRU", function( phone_number, element ) {
+ var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
+}, "Please specify a valid mobile number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -574,57 +972,70 @@ $.validator.addMethod("mobileNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("mobileUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/);
-}, "Please specify a valid mobile number");
+$.validator.addMethod( "mobileUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
+}, "Please specify a valid mobile number." );
+
+$.validator.addMethod( "netmask", function( value, element ) {
+ return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
+}, "Please enter a valid netmask." );
/*
- * The número de identidad de extranjero ( NIE )is a code used to identify the non-nationals in Spain
+ * The NIE (Número de Identificación de Extranjero) is a Spanish tax identification number assigned by the Spanish
+ * authorities to any foreigner.
+ *
+ * The NIE is the equivalent of a Spaniards Número de Identificación Fiscal (NIF) which serves as a fiscal
+ * identification number. The CIF number (Certificado de Identificación Fiscal) is equivalent to the NIF, but applies to
+ * companies rather than individuals. The NIE consists of an 'X' or 'Y' followed by 7 or 8 digits then another letter.
*/
-$.validator.addMethod( "nieES", function( value ) {
+$.validator.addMethod( "nieES", function( value, element ) {
"use strict";
- value = value.toUpperCase();
+ if ( this.optional( element ) ) {
+ return true;
+ }
- // Basic format test
- if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
+ var nieRegEx = new RegExp( /^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi );
+ var validChars = "TRWAGMYFPDXBNJZSQVHLCKET",
+ letter = value.substr( value.length - 1 ).toUpperCase(),
+ number;
+
+ value = value.toString().toUpperCase();
+
+ // Quick format test
+ if ( value.length > 10 || value.length < 9 || !nieRegEx.test( value ) ) {
return false;
}
- // Test NIE
- //T
- if ( /^[T]{1}/.test( value ) ) {
- return ( value[ 8 ] === /^[T]{1}[A-Z0-9]{8}$/.test( value ) );
- }
+ // X means same number
+ // Y means number + 10000000
+ // Z means number + 20000000
+ value = value.replace( /^[X]/, "0" )
+ .replace( /^[Y]/, "1" )
+ .replace( /^[Z]/, "2" );
- //XYZ
- if ( /^[XYZ]{1}/.test( value ) ) {
- return (
- value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt(
- value.replace( "X", "0" )
- .replace( "Y", "1" )
- .replace( "Z", "2" )
- .substring( 0, 8 ) % 23
- )
- );
- }
+ number = value.length === 9 ? value.substr( 0, 8 ) : value.substr( 0, 9 );
- return false;
+ return validChars.charAt( parseInt( number, 10 ) % 23 ) === letter;
}, "Please specify a valid NIE number." );
/*
* The Número de Identificación Fiscal ( NIF ) is the way tax identification used in Spain for individuals
*/
-$.validator.addMethod( "nifES", function( value ) {
+$.validator.addMethod( "nifES", function( value, element ) {
"use strict";
+ if ( this.optional( element ) ) {
+ return true;
+ }
+
value = value.toUpperCase();
// Basic format test
- if ( !value.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)") ) {
+ if ( !value.match( "((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)" ) ) {
return false;
}
@@ -632,22 +1043,104 @@ $.validator.addMethod( "nifES", function( value ) {
if ( /^[0-9]{8}[A-Z]{1}$/.test( value ) ) {
return ( "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 0 ) % 23 ) === value.charAt( 8 ) );
}
+
// Test specials NIF (starts with K, L or M)
if ( /^[KLM]{1}/.test( value ) ) {
- return ( value[ 8 ] === String.fromCharCode( 64 ) );
+ return ( value[ 8 ] === "TRWAGMYFPDXBNJZSQVHLCKE".charAt( value.substring( 8, 1 ) % 23 ) );
}
return false;
}, "Please specify a valid NIF number." );
-jQuery.validator.addMethod( "notEqualTo", function( value, element, param ) {
- return this.optional(element) || !$.validator.methods.equalTo.call( this, value, element, param );
+/*
+ * Numer identyfikacji podatkowej ( NIP ) is the way tax identification used in Poland for companies
+ */
+$.validator.addMethod( "nipPL", function( value ) {
+ "use strict";
+
+ value = value.replace( /[^0-9]/g, "" );
+
+ if ( value.length !== 10 ) {
+ return false;
+ }
+
+ var arrSteps = [ 6, 5, 7, 2, 3, 4, 5, 6, 7 ];
+ var intSum = 0;
+ for ( var i = 0; i < 9; i++ ) {
+ intSum += arrSteps[ i ] * value[ i ];
+ }
+ var int2 = intSum % 11;
+ var intControlNr = ( int2 === 10 ) ? 0 : int2;
+
+ return ( intControlNr === parseInt( value[ 9 ], 10 ) );
+}, "Please specify a valid NIP number." );
+
+/**
+ * Created for project jquery-validation.
+ * @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a
+ * Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers
+ * that are being used for validation.
+ * @copyright (c) 21/08/2018 13:14, Cleiton da Silva Mendonça
+ * @author Cleiton da Silva Mendonça
+ * @link http://gitlab.com/csmendonca Gitlab of Cleiton da Silva Mendonça
+ * @link http://github.com/csmendonca Github of Cleiton da Silva Mendonça
+ */
+$.validator.addMethod( "nisBR", function( value ) {
+ var number;
+ var cn;
+ var sum = 0;
+ var dv;
+ var count;
+ var multiplier;
+
+ // Removing special characters from value
+ value = value.replace( /([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g, "" );
+
+ // Checking value to have 11 digits only
+ if ( value.length !== 11 ) {
+ return false;
+ }
+
+ //Get check number of value
+ cn = parseInt( value.substring( 10, 11 ), 10 );
+
+ //Get number with 10 digits of the value
+ number = parseInt( value.substring( 0, 10 ), 10 );
+
+ for ( count = 2; count < 12; count++ ) {
+ multiplier = count;
+ if ( count === 10 ) {
+ multiplier = 2;
+ }
+ if ( count === 11 ) {
+ multiplier = 3;
+ }
+ sum += ( ( number % 10 ) * multiplier );
+ number = parseInt( number / 10, 10 );
+ }
+ dv = ( sum % 11 );
+
+ if ( dv > 1 ) {
+ dv = ( 11 - dv );
+ } else {
+ dv = 0;
+ }
+
+ if ( cn === dv ) {
+ return true;
+ } else {
+ return false;
+ }
+}, "Please specify a valid NIS/PIS number." );
+
+$.validator.addMethod( "notEqualTo", function( value, element, param ) {
+ return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
}, "Please enter a different value, values must not be the same." );
-$.validator.addMethod("nowhitespace", function(value, element) {
- return this.optional(element) || /^\S+$/i.test(value);
-}, "No white space please");
+$.validator.addMethod( "nowhitespace", function( value, element ) {
+ return this.optional( element ) || /^\S+$/i.test( value );
+}, "No white space please." );
/**
* Return true if the field value matches the given format RegExp
@@ -662,22 +1155,46 @@ $.validator.addMethod("nowhitespace", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("pattern", function(value, element, param) {
- if (this.optional(element)) {
+$.validator.addMethod( "pattern", function( value, element, param ) {
+ if ( this.optional( element ) ) {
return true;
}
- if (typeof param === "string") {
- param = new RegExp("^(?:" + param + ")$");
+ if ( typeof param === "string" ) {
+ param = new RegExp( "^(?:" + param + ")$" );
}
- return param.test(value);
-}, "Invalid format.");
+ return param.test( value );
+}, "Invalid format." );
/**
* Dutch phone numbers have 10 digits (or 11 and start with +31).
*/
-$.validator.addMethod("phoneNL", function(value, element) {
- return this.optional(element) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(value);
-}, "Please specify a valid phone number.");
+$.validator.addMethod( "phoneNL", function( value, element ) {
+ return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
+}, "Please specify a valid phone number." );
+
+/**
+ * Polish telephone numbers have 9 digits.
+ *
+ * Mobile phone numbers starts with following digits:
+ * 45, 50, 51, 53, 57, 60, 66, 69, 72, 73, 78, 79, 88.
+ *
+ * Fixed-line numbers starts with area codes:
+ * 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 29, 32, 33,
+ * 34, 41, 42, 43, 44, 46, 48, 52, 54, 55, 56, 58, 59, 61,
+ * 62, 63, 65, 67, 68, 71, 74, 75, 76, 77, 81, 82, 83, 84,
+ * 85, 86, 87, 89, 91, 94, 95.
+ *
+ * Ministry of National Defence numbers and VoIP numbers starts with 26 and 39.
+ *
+ * Excludes intelligent networks (premium rate, shared cost, free phone numbers).
+ *
+ * Poland National Numbering Plan http://www.itu.int/oth/T02020000A8/en
+ */
+$.validator.addMethod( "phonePL", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
+ return this.optional( element ) || regexp.test( phone_number );
+}, "Please specify a valid phone number." );
/* For UK phone functions, do the following server side processing:
* Compare original input with this RegEx pattern:
@@ -687,14 +1204,30 @@ $.validator.addMethod("phoneNL", function(value, element) {
* A number of very detailed GB telephone number RegEx patterns can also be found at:
* http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
*/
-$.validator.addMethod("phoneUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/);
-}, "Please specify a valid phone number");
+
+// Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
+$.validator.addMethod( "phonesUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
+}, "Please specify a valid uk phone number." );
+
+/* For UK phone functions, do the following server side processing:
+ * Compare original input with this RegEx pattern:
+ * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
+ * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
+ * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
+ * A number of very detailed GB telephone number RegEx patterns can also be found at:
+ * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
+ */
+$.validator.addMethod( "phoneUK", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
+}, "Please specify a valid phone number." );
/**
- * matches US phone number format
+ * Matches US phone number format
*
* where the area code may not start with 1 and the prefix may not start with 1
* allows '-' or ' ' as a separator and allows parens around area code
@@ -709,26 +1242,23 @@ $.validator.addMethod("phoneUK", function(phone_number, element) {
* and not
* 212 123 4567
*/
-$.validator.addMethod("phoneUS", function(phone_number, element) {
- phone_number = phone_number.replace(/\s+/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/);
-}, "Please specify a valid phone number");
+$.validator.addMethod( "phoneUS", function( phone_number, element ) {
+ phone_number = phone_number.replace( /\s+/g, "" );
+ return this.optional( element ) || phone_number.length > 9 &&
+ phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
+}, "Please specify a valid phone number." );
-/* For UK phone functions, do the following server side processing:
- * Compare original input with this RegEx pattern:
- * ^\(?(?:(?:00\)?[\s\-]?\(?|\+)(44)\)?[\s\-]?\(?(?:0\)?[\s\-]?\(?)?|0)([1-9]\d{1,4}\)?[\s\d\-]+)$
- * Extract $1 and set $prefix to '+44' if $1 is '44', otherwise set $prefix to '0'
- * Extract $2 and remove hyphens, spaces and parentheses. Phone number is combined $prefix and $2.
- * A number of very detailed GB telephone number RegEx patterns can also be found at:
- * http://www.aa-asterisk.org.uk/index.php/Regular_Expressions_for_Validating_and_Formatting_GB_Telephone_Numbers
- */
-//Matches UK landline + mobile, accepting only 01-3 for landline or 07 for mobile to exclude many premium numbers
-$.validator.addMethod("phonesUK", function(phone_number, element) {
- phone_number = phone_number.replace(/\(|\)|\s+|-/g, "");
- return this.optional(element) || phone_number.length > 9 &&
- phone_number.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/);
-}, "Please specify a valid uk phone number");
+/*
+* Valida CEPs do brasileiros:
+*
+* Formatos aceitos:
+* 99999-999
+* 99.999-999
+* 99999999
+*/
+$.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
+ return this.optional( element ) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
+}, "Informe um CEP válido." );
/**
* Matches a valid Canadian Postal Code
@@ -744,34 +1274,22 @@ $.validator.addMethod("phonesUK", function(phone_number, element) {
* @cat Plugins/Validate/Methods
*/
$.validator.addMethod( "postalCodeCA", function( value, element ) {
- return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test( value );
-}, "Please specify a valid postal code" );
-
-/*
-* Valida CEPs do brasileiros:
-*
-* Formatos aceitos:
-* 99999-999
-* 99.999-999
-* 99999999
-*/
-$.validator.addMethod("postalcodeBR", function(cep_value, element) {
- return this.optional(element) || /^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test( cep_value );
-}, "Informe um CEP válido.");
+ return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
+}, "Please specify a valid postal code." );
/* Matches Italian postcode (CAP) */
-$.validator.addMethod("postalcodeIT", function(value, element) {
- return this.optional(element) || /^\d{5}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeIT", function( value, element ) {
+ return this.optional( element ) || /^\d{5}$/.test( value );
+}, "Please specify a valid postal code." );
-$.validator.addMethod("postalcodeNL", function(value, element) {
- return this.optional(element) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(value);
-}, "Please specify a valid postal code");
+$.validator.addMethod( "postalcodeNL", function( value, element ) {
+ return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
+}, "Please specify a valid postal code." );
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
-$.validator.addMethod("postcodeUK", function(value, element) {
- return this.optional(element) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(value);
-}, "Please specify a valid UK postcode");
+$.validator.addMethod( "postcodeUK", function( value, element ) {
+ return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
+}, "Please specify a valid UK postcode." );
/*
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -789,27 +1307,27 @@ $.validator.addMethod("postcodeUK", function(value, element) {
* options[0]: number of fields that must be filled in the group
* options[1]: CSS selector that defines the group of conditionally required fields
*/
-$.validator.addMethod("require_from_group", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_req_grp") ? $fieldsFirst.data("valid_req_grp") : $.extend({}, this),
- isValid = $fields.filter(function() {
- return validator.elementValue(this);
- }).length >= options[0];
+$.validator.addMethod( "require_from_group", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_req_grp" ) ? $fieldsFirst.data( "valid_req_grp" ) : $.extend( {}, this ),
+ isValid = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_req_grp", validator);
+ $fieldsFirst.data( "valid_req_grp", validator );
// If element isn't being validated, run each require_from_group field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please fill at least {0} of these fields."));
+}, $.validator.format( "Please fill at least {0} of these fields." ) );
/*
* Lets you say "either at least X inputs that match selector Y must be filled,
@@ -832,28 +1350,28 @@ $.validator.addMethod("require_from_group", function(value, element, options) {
* options[1]: CSS selector that defines the group of conditionally required fields
*
*/
-$.validator.addMethod("skip_or_fill_minimum", function(value, element, options) {
- var $fields = $(options[1], element.form),
- $fieldsFirst = $fields.eq(0),
- validator = $fieldsFirst.data("valid_skip") ? $fieldsFirst.data("valid_skip") : $.extend({}, this),
- numberFilled = $fields.filter(function() {
- return validator.elementValue(this);
- }).length,
- isValid = numberFilled === 0 || numberFilled >= options[0];
+$.validator.addMethod( "skip_or_fill_minimum", function( value, element, options ) {
+ var $fields = $( options[ 1 ], element.form ),
+ $fieldsFirst = $fields.eq( 0 ),
+ validator = $fieldsFirst.data( "valid_skip" ) ? $fieldsFirst.data( "valid_skip" ) : $.extend( {}, this ),
+ numberFilled = $fields.filter( function() {
+ return validator.elementValue( this );
+ } ).length,
+ isValid = numberFilled === 0 || numberFilled >= options[ 0 ];
// Store the cloned validator for future validation
- $fieldsFirst.data("valid_skip", validator);
+ $fieldsFirst.data( "valid_skip", validator );
// If element isn't being validated, run each skip_or_fill_minimum field's validation rules
- if (!$(element).data("being_validated")) {
- $fields.data("being_validated", true);
- $fields.each(function() {
- validator.element(this);
- });
- $fields.data("being_validated", false);
+ if ( !$( element ).data( "being_validated" ) ) {
+ $fields.data( "being_validated", true );
+ $fields.each( function() {
+ validator.element( this );
+ } );
+ $fields.data( "being_validated", false );
}
return isValid;
-}, $.validator.format("Please either skip these fields or fill at least {0} of them."));
+}, $.validator.format( "Please either skip these fields or fill at least {0} of them." ) );
/* Validates US States and/or Territories by @jdforsythe
* Can be case insensitive or require capitalization - default is case insensitive
@@ -888,49 +1406,45 @@ $.validator.addMethod("skip_or_fill_minimum", function(value, element, options)
* includeMilitary: true
* }
*
- *
- *
*/
-
-$.validator.addMethod("stateUS", function(value, element, options) {
+$.validator.addMethod( "stateUS", function( value, element, options ) {
var isDefault = typeof options === "undefined",
caseSensitive = ( isDefault || typeof options.caseSensitive === "undefined" ) ? false : options.caseSensitive,
includeTerritories = ( isDefault || typeof options.includeTerritories === "undefined" ) ? false : options.includeTerritories,
includeMilitary = ( isDefault || typeof options.includeMilitary === "undefined" ) ? false : options.includeMilitary,
regex;
- if (!includeTerritories && !includeMilitary) {
+ if ( !includeTerritories && !includeMilitary ) {
regex = "^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
- } else if (includeTerritories && includeMilitary) {
+ } else if ( includeTerritories && includeMilitary ) {
regex = "^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
- } else if (includeTerritories) {
+ } else if ( includeTerritories ) {
regex = "^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$";
} else {
regex = "^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$";
}
- regex = caseSensitive ? new RegExp(regex) : new RegExp(regex, "i");
- return this.optional(element) || regex.test(value);
-},
-"Please specify a valid state");
+ regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
+ return this.optional( element ) || regex.test( value );
+}, "Please specify a valid state." );
// TODO check if value starts with <, otherwise don't try stripping anything
-$.validator.addMethod("strippedminlength", function(value, element, param) {
- return $(value).text().length >= param;
-}, $.validator.format("Please enter at least {0} characters"));
+$.validator.addMethod( "strippedminlength", function( value, element, param ) {
+ return $( value ).text().length >= param;
+}, $.validator.format( "Please enter at least {0} characters." ) );
-$.validator.addMethod("time", function(value, element) {
- return this.optional(element) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(value);
-}, "Please enter a valid time, between 00:00 and 23:59");
+$.validator.addMethod( "time", function( value, element ) {
+ return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
+}, "Please enter a valid time, between 00:00 and 23:59." );
-$.validator.addMethod("time12h", function(value, element) {
- return this.optional(element) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(value);
-}, "Please enter a valid time in 12-hour am/pm format");
+$.validator.addMethod( "time12h", function( value, element ) {
+ return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
+}, "Please enter a valid time in 12-hour am/pm format." );
-// same as url, but TLD is optional
-$.validator.addMethod("url2", function(value, element) {
- return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
-}, $.validator.messages.url);
+// Same as url, but TLD is optional
+$.validator.addMethod( "url2", function( value, element ) {
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+}, $.validator.messages.url );
/**
* Return true, if the value is a valid vehicle identification number (VIN).
@@ -944,8 +1458,8 @@ $.validator.addMethod("url2", function(value, element) {
* @type Boolean
* @cat Plugins/Validate/Methods
*/
-$.validator.addMethod("vinUS", function(v) {
- if (v.length !== 17) {
+$.validator.addMethod( "vinUS", function( v ) {
+ if ( v.length !== 17 ) {
return false;
}
@@ -955,21 +1469,21 @@ $.validator.addMethod("vinUS", function(v) {
rs = 0,
i, n, d, f, cd, cdv;
- for (i = 0; i < 17; i++) {
- f = FL[i];
- d = v.slice(i, i + 1);
- if (i === 8) {
+ for ( i = 0; i < 17; i++ ) {
+ f = FL[ i ];
+ d = v.slice( i, i + 1 );
+ if ( i === 8 ) {
cdv = d;
}
- if (!isNaN(d)) {
+ if ( !isNaN( d ) ) {
d *= f;
} else {
- for (n = 0; n < LL.length; n++) {
- if (d.toUpperCase() === LL[n]) {
- d = VL[n];
+ for ( n = 0; n < LL.length; n++ ) {
+ if ( d.toUpperCase() === LL[ n ] ) {
+ d = VL[ n ];
d *= f;
- if (isNaN(cdv) && n === 8) {
- cdv = LL[n];
+ if ( isNaN( cdv ) && n === 8 ) {
+ cdv = LL[ n ];
}
break;
}
@@ -978,21 +1492,21 @@ $.validator.addMethod("vinUS", function(v) {
rs += d;
}
cd = rs % 11;
- if (cd === 10) {
+ if ( cd === 10 ) {
cd = "X";
}
- if (cd === cdv) {
+ if ( cd === cdv ) {
return true;
}
return false;
-}, "The specified vehicle identification number (VIN) is invalid.");
-
-$.validator.addMethod("zipcodeUS", function(value, element) {
- return this.optional(element) || /^\d{5}(-\d{4})?$/.test(value);
-}, "The specified US ZIP Code is invalid");
+}, "The specified vehicle identification number (VIN) is invalid." );
-$.validator.addMethod("ziprange", function(value, element) {
- return this.optional(element) || /^90[2-5]\d\{2\}-\d{4}$/.test(value);
-}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx");
+$.validator.addMethod( "zipcodeUS", function( value, element ) {
+ return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
+}, "The specified US ZIP Code is invalid." );
+$.validator.addMethod( "ziprange", function( value, element ) {
+ return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
+}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
index b63c3ca12c99..80f14b58c2e1 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",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12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("abaRoutingNumber",function(a){var b=0,c=a.split(""),d=c.length;if(9!==d)return!1;for(var e=0;e9?"0":f,g="JABCDEFGHI".substr(f,1).toString(),i.match(/[ABEH]/)?k===f:i.match(/[KPQS]/)?k===g:k===f||k===g},"Please specify a valid CIF number."),a.validator.addMethod("cnhBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f,g,h=0,i=0;if(b=a.charAt(0),new Array(12).join(b)===a)return!1;for(e=0,f=9,g=0;e<9;++e,--f)h+=+(a.charAt(e)*f);for(c=h%11,c>=10&&(c=0,i=2),h=0,e=0,f=1,g=0;e<9;++e,++f)h+=+(a.charAt(e)*f);return d=h%11,d>=10?d=0:d-=i,String(c).concat(d)===a.substr(-2)},"Please specify a valid CNH number."),a.validator.addMethod("cnpjBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/[^\d]+/g,""),14!==a.length)return!1;if("00000000000000"===a||"11111111111111"===a||"22222222222222"===a||"33333333333333"===a||"44444444444444"===a||"55555555555555"===a||"66666666666666"===a||"77777777777777"===a||"88888888888888"===a||"99999999999999"===a)return!1;for(var c=a.length-2,d=a.substring(0,c),e=a.substring(c),f=0,g=c-7,h=c;h>=1;h--)f+=d.charAt(c-h)*g--,g<2&&(g=9);var i=f%11<2?0:11-f%11;if(i!==parseInt(e.charAt(0),10))return!1;c+=1,d=a.substring(0,c),f=0,g=c-7;for(var j=c;j>=1;j--)f+=d.charAt(c-j)*g--,g<2&&(g=9);return i=f%11<2?0:11-f%11,i===parseInt(e.charAt(1),10)},"Please specify a CNPJ value number."),a.validator.addMethod("cpfBR",function(a,b){"use strict";if(this.optional(b))return!0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var c,d,e,f,g=0;if(c=parseInt(a.substring(9,10),10),d=parseInt(a.substring(10,11),10),e=function(a,b){var c=10*a%11;return 10!==c&&11!==c||(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(f=1;f<=9;f++)g+=parseInt(a.substring(f-1,f),10)*(11-f);if(e(g,c)){for(g=0,f=1;f<=10;f++)g+=parseInt(a.substring(f-1,f),10)*(12-f);return e(g,d)}return!1},"Please specify a valid CPF number."),a.validator.addMethod("creditcard",function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},"Please enter a valid credit card number."),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&(/^(5[12345])/.test(a)||/^(2[234567])/.test(a))?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:!!(128&d)},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=!!e||c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency."),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number."),a.validator.addMethod("greaterThan",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThan-blur").length&&e.addClass("validate-greaterThan-blur").on("blur.validate-greaterThan",function(){a(c).valid()}),b>e.val()},"Please enter a greater value."),a.validator.addMethod("greaterThanEqual",function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-greaterThanEqual-blur").length&&e.addClass("validate-greaterThanEqual-blur").on("blur.validate-greaterThanEqual",function(){a(c).valid()}),b>=e.val()},"Please enter a greater value."),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="",q=5;if(l.lengthd)},a.validator.format("Please select no more than {0} files.")),a.validator.addMethod("maxsize",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0;ed)return!1;return!0},a.validator.format("File size must not exceed {0} bytes each.")),a.validator.addMethod("maxsizetotal",function(b,c,d){if(this.optional(c))return!0;if("file"===a(c).attr("type")&&c.files&&c.files.length)for(var e=0,f=0;fd)return!1;return!0},a.validator.format("Total size of all files must not exceed {0} bytes.")),a.validator.addMethod("mobileNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid mobile number."),a.validator.addMethod("mobileRU",function(a,b){var c=a.replace(/\(|\)|\s+|-/g,"");return this.optional(b)||c.length>9&&/^((\+7|7|8)+([0-9]){10})$/.test(c)},"Please specify a valid mobile number."),a.validator.addMethod("mobileUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number."),a.validator.addMethod("netmask",function(a,b){return this.optional(b)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(a)},"Please enter a valid netmask."),a.validator.addMethod("nieES",function(a,b){"use strict";if(this.optional(b))return!0;var c,d=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),e="TRWAGMYFPDXBNJZSQVHLCKET",f=a.substr(a.length-1).toUpperCase();return a=a.toString().toUpperCase(),!(a.length>10||a.length<9||!d.test(a))&&(a=a.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2"),c=9===a.length?a.substr(0,8):a.substr(0,9),e.charAt(parseInt(c,10)%23)===f)},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a,b){"use strict";return!!this.optional(b)||(a=a.toUpperCase(),!!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):!!/^[KLM]{1}/.test(a)&&a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,1)%23)))},"Please specify a valid NIF number."),a.validator.addMethod("nipPL",function(a){"use strict";if(a=a.replace(/[^0-9]/g,""),10!==a.length)return!1;for(var b=[6,5,7,2,3,4,5,6,7],c=0,d=0;d<9;d++)c+=b[d]*a[d];var e=c%11,f=10===e?0:e;return f===parseInt(a[9],10)},"Please specify a valid NIP number."),a.validator.addMethod("nisBR",function(a){var b,c,d,e,f,g=0;if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;for(c=parseInt(a.substring(10,11),10),b=parseInt(a.substring(0,10),10),e=2;e<12;e++)f=e,10===e&&(f=2),11===e&&(f=3),g+=b%10*f,b=parseInt(b/10,10);return d=g%11,d=d>1?11-d:0,c===d},"Please specify a valid NIS/PIS number."),a.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please."),a.validator.addMethod("pattern",function(a,b,c){return!!this.optional(b)||("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonePL",function(a,b){a=a.replace(/\s+/g,"");var c=/^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;return this.optional(b)||c.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number."),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number."),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code."),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode."),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=!e&&"undefined"!=typeof c.caseSensitive&&c.caseSensitive,g=!e&&"undefined"!=typeof c.includeTerritories&&c.includeTerritories,h=!e&&"undefined"!=typeof c.includeMilitary&&c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state."),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters.")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59."),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format."),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;b<17;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c" )
- .attr( "name", validator.submitButton.name )
- .val( $( validator.submitButton ).val() )
- .appendTo( validator.currentForm );
- }
+
+ // Insert a hidden input as a replacement for the missing submit button
+ // The hidden input is inserted in two cases:
+ // - A user defined a `submitHandler`
+ // - There was a pending request due to `remote` method and `stopRequest()`
+ // was called to submit the form in case it's valid
+ if ( validator.submitButton && ( validator.settings.submitHandler || validator.formSubmitted ) ) {
+ hidden = $( "" )
+ .attr( "name", validator.submitButton.name )
+ .val( $( validator.submitButton ).val() )
+ .appendTo( validator.currentForm );
+ }
+
+ if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
- if ( validator.submitButton ) {
- // and clean up afterwards; thanks to no-block-scope, hidden can be referenced
+ if ( hidden ) {
+
+ // And clean up afterwards; thanks to no-block-scope, hidden can be referenced
hidden.remove();
}
if ( result !== undefined ) {
@@ -85,7 +98,7 @@ $.extend($.fn, {
return true;
}
- // prevent submit for invalid forms or custom submit handlers
+ // Prevent submit for invalid forms or custom submit handlers
if ( validator.cancelSubmit ) {
validator.cancelSubmit = false;
return handle();
@@ -100,12 +113,13 @@ $.extend($.fn, {
validator.focusInvalid();
return false;
}
- });
+ } );
}
return validator;
},
- // http://jqueryvalidation.org/valid/
+
+ // https://jqueryvalidation.org/valid/
valid: function() {
var valid, validator, errorList;
@@ -117,18 +131,35 @@ $.extend($.fn, {
validator = $( this[ 0 ].form ).validate();
this.each( function() {
valid = validator.element( this ) && valid;
- errorList = errorList.concat( validator.errorList );
- });
+ if ( !valid ) {
+ errorList = errorList.concat( validator.errorList );
+ }
+ } );
validator.errorList = errorList;
}
return valid;
},
- // http://jqueryvalidation.org/rules/
+ // https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
+ isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
+ // If nothing is selected, return empty object; can't chain anyway
+ if ( element == null ) {
+ return;
+ }
+
+ if ( !element.form && isContentEditable ) {
+ element.form = this.closest( "form" )[ 0 ];
+ element.name = this.attr( "name" );
+ }
+
+ if ( element.form == null ) {
+ return;
+ }
+
if ( command ) {
settings = $.data( element.form, "validator" ).settings;
staticRules = settings.rules;
@@ -136,7 +167,8 @@ $.extend($.fn, {
switch ( command ) {
case "add":
$.extend( existingRules, $.validator.normalizeRule( argument ) );
- // remove messages from rules, but allow them to be set separately
+
+ // Remove messages from rules, but allow them to be set separately
delete existingRules.messages;
staticRules[ element.name ] = existingRules;
if ( argument.messages ) {
@@ -152,10 +184,7 @@ $.extend($.fn, {
$.each( argument.split( /\s/ ), function( index, method ) {
filtered[ method ] = existingRules[ method ];
delete existingRules[ method ];
- if ( method === "required" ) {
- $( element ).removeAttr( "aria-required" );
- }
- });
+ } );
return filtered;
}
}
@@ -169,49 +198,59 @@ $.extend($.fn, {
$.validator.staticRules( element )
), element );
- // make sure required is at front
+ // Make sure required is at front
if ( data.required ) {
param = data.required;
delete data.required;
data = $.extend( { required: param }, data );
- $( element ).attr( "aria-required", "true" );
}
- // make sure remote is at back
+ // Make sure remote is at back
if ( data.remote ) {
param = data.remote;
delete data.remote;
- data = $.extend( data, { remote: param });
+ data = $.extend( data, { remote: param } );
}
return data;
}
-});
+} );
+
+// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
+var trim = function( str ) {
+
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
+ return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
+};
// Custom selectors
-$.extend( $.expr[ ":" ], {
- // http://jqueryvalidation.org/blank-selector/
+$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support
+
+ // https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
- return !$.trim( "" + $( a ).val() );
+ return !trim( "" + $( a ).val() );
},
- // http://jqueryvalidation.org/filled-selector/
+
+ // https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
- return !!$.trim( "" + $( a ).val() );
+ var val = $( a ).val();
+ return val !== null && !!trim( "" + val );
},
- // http://jqueryvalidation.org/unchecked-selector/
+
+ // https://jqueryvalidation.org/unchecked-selector/
unchecked: function( a ) {
return !$( a ).prop( "checked" );
}
-});
+} );
-// constructor for validator
+// Constructor for validator
$.validator = function( options, form ) {
this.settings = $.extend( true, {}, $.validator.defaults, options );
this.currentForm = form;
this.init();
};
-// http://jqueryvalidation.org/jQuery.validator.format/
+// https://jqueryvalidation.org/jQuery.validator.format/
$.validator.format = function( source, params ) {
if ( arguments.length === 1 ) {
return function() {
@@ -220,6 +259,9 @@ $.validator.format = function( source, params ) {
return $.validator.format.apply( this, args );
};
}
+ if ( params === undefined ) {
+ return source;
+ }
if ( arguments.length > 2 && params.constructor !== Array ) {
params = $.makeArray( arguments ).slice( 1 );
}
@@ -229,8 +271,8 @@ $.validator.format = function( source, params ) {
$.each( params, function( i, n ) {
source = source.replace( new RegExp( "\\{" + i + "\\}", "g" ), function() {
return n;
- });
- });
+ } );
+ } );
return source;
};
@@ -241,6 +283,7 @@ $.extend( $.validator, {
groups: {},
rules: {},
errorClass: "error",
+ pendingClass: "pending",
validClass: "valid",
errorElement: "label",
focusCleanup: false,
@@ -267,6 +310,7 @@ $.extend( $.validator, {
}
},
onkeyup: function( element, event ) {
+
// Avoid revalidate the field when pressing one of the following keys
// Shift => 16
// Ctrl => 17
@@ -288,16 +332,17 @@ $.extend( $.validator, {
if ( event.which === 9 && this.elementValue( element ) === "" || $.inArray( event.keyCode, excludedKeys ) !== -1 ) {
return;
- } else if ( element.name in this.submitted || element === this.lastElement ) {
+ } else if ( element.name in this.submitted || element.name in this.invalid ) {
this.element( element );
}
},
onclick: function( element ) {
- // click on selects, radiobuttons and checkboxes
+
+ // Click on selects, radiobuttons and checkboxes
if ( element.name in this.submitted ) {
this.element( element );
- // or option elements, check parent select in that case
+ // Or option elements, check parent select in that case
} else if ( element.parentNode.name in this.submitted ) {
this.element( element.parentNode );
}
@@ -318,7 +363,7 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/jQuery.validator.setDefaults/
+ // https://jqueryvalidation.org/jQuery.validator.setDefaults/
setDefaults: function( settings ) {
$.extend( $.validator.defaults, settings );
},
@@ -329,17 +374,17 @@ $.extend( $.validator, {
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
- dateISO: "Please enter a valid date ( ISO ).",
+ dateISO: "Please enter a valid date (ISO).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
- creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: $.validator.format( "Please enter no more than {0} characters." ),
minlength: $.validator.format( "Please enter at least {0} characters." ),
rangelength: $.validator.format( "Please enter a value between {0} and {1} characters long." ),
range: $.validator.format( "Please enter a value between {0} and {1}." ),
max: $.validator.format( "Please enter a value less than or equal to {0}." ),
- min: $.validator.format( "Please enter a value greater than or equal to {0}." )
+ min: $.validator.format( "Please enter a value greater than or equal to {0}." ),
+ step: $.validator.format( "Please enter a multiple of {0}." )
},
autoCreateRanges: false,
@@ -357,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
- var groups = ( this.groups = {} ),
+ var currentForm = this.currentForm,
+ groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@@ -365,14 +411,28 @@ $.extend( $.validator, {
}
$.each( value, function( index, name ) {
groups[ name ] = key;
- });
- });
+ } );
+ } );
rules = this.settings.rules;
$.each( rules, function( key, value ) {
rules[ key ] = $.validator.normalizeRule( value );
- });
+ } );
function delegate( event ) {
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ // Set form expando on contenteditable
+ if ( !this.form && isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = $( this ).attr( "name" );
+ }
+
+ // Ignore the element if it belongs to another form. This will happen mainly
+ // when setting the `form` attribute of an input to the id of another form.
+ if ( currentForm !== this.form ) {
+ return;
+ }
+
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@@ -386,27 +446,24 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
- "[type='radio'], [type='checkbox']", delegate)
+ "[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
+
// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
- .on("click.validate", "select, option, [type='radio'], [type='checkbox']", delegate);
+ .on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
if ( this.settings.invalidHandler ) {
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
}
-
- // Add aria-required to any Static/Data/Class required fields before first validation
- // Screen readers require this attribute to be present before the initial submission http://www.w3.org/TR/WCAG-TECHS/ARIA2.html
- $( this.currentForm ).find( "[required], [data-rule-required], .required" ).attr( "aria-required", "true" );
},
- // http://jqueryvalidation.org/Validator.form/
+ // https://jqueryvalidation.org/Validator.form/
form: function() {
this.checkForm();
$.extend( this.submitted, this.errorMap );
- this.invalid = $.extend({}, this.errorMap );
+ this.invalid = $.extend( {}, this.errorMap );
if ( !this.valid() ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
}
this.showErrors();
return this.valid();
@@ -420,13 +477,13 @@ $.extend( $.validator, {
return this.valid();
},
- // http://jqueryvalidation.org/Validator.element/
+ // https://jqueryvalidation.org/Validator.element/
element: function( element ) {
var cleanElement = this.clean( element ),
checkElement = this.validationTargetFor( cleanElement ),
- result = true;
-
- this.lastElement = checkElement;
+ v = this,
+ result = true,
+ rs, group;
if ( checkElement === undefined ) {
delete this.invalid[ cleanElement.name ];
@@ -434,40 +491,61 @@ $.extend( $.validator, {
this.prepareElement( checkElement );
this.currentElements = $( checkElement );
- result = this.check( checkElement ) !== false;
- if ( result ) {
- delete this.invalid[ checkElement.name ];
+ // If this element is grouped, then validate all group elements already
+ // containing a value
+ group = this.groups[ checkElement.name ];
+ if ( group ) {
+ $.each( this.groups, function( name, testgroup ) {
+ if ( testgroup === group && name !== checkElement.name ) {
+ cleanElement = v.validationTargetFor( v.clean( v.findByName( name ) ) );
+ if ( cleanElement && cleanElement.name in v.invalid ) {
+ v.currentElements.push( cleanElement );
+ result = v.check( cleanElement ) && result;
+ }
+ }
+ } );
+ }
+
+ rs = this.check( checkElement ) !== false;
+ result = result && rs;
+ if ( rs ) {
+ this.invalid[ checkElement.name ] = false;
} else {
this.invalid[ checkElement.name ] = true;
}
- }
- // Add aria-invalid status for screen readers
- $( element ).attr( "aria-invalid", !result );
- if ( !this.numberOfInvalids() ) {
- // Hide error containers on last error
- this.toHide = this.toHide.add( this.containers );
+ if ( !this.numberOfInvalids() ) {
+
+ // Hide error containers on last error
+ this.toHide = this.toHide.add( this.containers );
+ }
+ this.showErrors();
+
+ // Add aria-invalid status for screen readers
+ $( element ).attr( "aria-invalid", !rs );
}
- this.showErrors();
+
return result;
},
- // http://jqueryvalidation.org/Validator.showErrors/
+ // https://jqueryvalidation.org/Validator.showErrors/
showErrors: function( errors ) {
if ( errors ) {
- // add items to error list and map
+ var validator = this;
+
+ // Add items to error list and map
$.extend( this.errorMap, errors );
- this.errorList = [];
- for ( var name in errors ) {
- this.errorList.push({
- message: errors[ name ],
- element: this.findByName( name )[ 0 ]
- });
- }
- // remove items from success list
+ this.errorList = $.map( this.errorMap, function( message, name ) {
+ return {
+ message: message,
+ element: validator.findByName( name )[ 0 ]
+ };
+ } );
+
+ // Remove items from success list
this.successList = $.grep( this.successList, function( element ) {
return !( element.name in errors );
- });
+ } );
}
if ( this.settings.showErrors ) {
this.settings.showErrors.call( this, this.errorMap, this.errorList );
@@ -476,26 +554,35 @@ $.extend( $.validator, {
}
},
- // http://jqueryvalidation.org/Validator.resetForm/
+ // https://jqueryvalidation.org/Validator.resetForm/
resetForm: function() {
if ( $.fn.resetForm ) {
$( this.currentForm ).resetForm();
}
+ this.invalid = {};
this.submitted = {};
- this.lastElement = null;
this.prepareForm();
this.hideErrors();
- var i, elements = this.elements()
+ var elements = this.elements()
.removeData( "previousValue" )
.removeAttr( "aria-invalid" );
+ this.resetElements( elements );
+ },
+
+ resetElements: function( elements ) {
+ var i;
+
if ( this.settings.unhighlight ) {
for ( i = 0; elements[ i ]; i++ ) {
this.settings.unhighlight.call( this, elements[ i ],
this.settings.errorClass, "" );
+ this.findByName( elements[ i ].name ).removeClass( this.settings.validClass );
}
} else {
- elements.removeClass( this.settings.errorClass );
+ elements
+ .removeClass( this.settings.errorClass )
+ .removeClass( this.settings.validClass );
}
},
@@ -508,7 +595,12 @@ $.extend( $.validator, {
var count = 0,
i;
for ( i in obj ) {
- count++;
+
+ // This check allows counting elements with empty error
+ // message as invalid elements
+ if ( obj[ i ] !== undefined && obj[ i ] !== null && obj[ i ] !== false ) {
+ count++;
+ }
}
return count;
},
@@ -533,13 +625,15 @@ $.extend( $.validator, {
focusInvalid: function() {
if ( this.settings.focusInvalid ) {
try {
- $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
+ $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
- .focus()
- // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
+ .trigger( "focus" )
+
+ // Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
} catch ( e ) {
- // ignore IE throwing errors when focusing hidden elements
+
+ // Ignore IE throwing errors when focusing hidden elements
}
}
},
@@ -548,31 +642,45 @@ $.extend( $.validator, {
var lastActive = this.lastActive;
return lastActive && $.grep( this.errorList, function( n ) {
return n.element.name === lastActive.name;
- }).length === 1 && lastActive;
+ } ).length === 1 && lastActive;
},
elements: function() {
var validator = this,
rulesCache = {};
- // select all valid inputs inside the form (no submit or reset buttons)
+ // Select all valid inputs inside the form (no submit or reset buttons)
return $( this.currentForm )
- .find( "input, select, textarea" )
+ .find( "input, select, textarea, [contenteditable]" )
.not( ":submit, :reset, :image, :disabled" )
.not( this.settings.ignore )
.filter( function() {
- if ( !this.name && validator.settings.debug && window.console ) {
+ var name = this.name || $( this ).attr( "name" ); // For contenteditable
+ var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
+
+ if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
- // select only the first element for each name, and only those with rules specified
- if ( this.name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
+ // Set form expando on contenteditable
+ if ( isContentEditable ) {
+ this.form = $( this ).closest( "form" )[ 0 ];
+ this.name = name;
+ }
+
+ // Ignore elements that belong to other/nested forms
+ if ( this.form !== validator.currentForm ) {
+ return false;
+ }
+
+ // Select only the first element for each name, and only those with rules specified
+ if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
}
- rulesCache[ this.name ] = true;
+ rulesCache[ name ] = true;
return true;
- });
+ } );
},
clean: function( selector ) {
@@ -584,12 +692,16 @@ $.extend( $.validator, {
return $( this.settings.errorElement + "." + errorClass, this.errorContext );
},
- reset: function() {
+ resetInternals: function() {
this.successList = [];
this.errorList = [];
this.errorMap = {};
this.toShow = $( [] );
this.toHide = $( [] );
+ },
+
+ reset: function() {
+ this.resetInternals();
this.currentElements = $( [] );
},
@@ -604,19 +716,49 @@ $.extend( $.validator, {
},
elementValue: function( element ) {
- var val,
- $element = $( element ),
- type = element.type;
+ var $element = $( element ),
+ type = element.type,
+ isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
+ val, idx;
if ( type === "radio" || type === "checkbox" ) {
- return this.findByName( element.name ).filter(":checked").val();
+ return this.findByName( element.name ).filter( ":checked" ).val();
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
- return element.validity.badInput ? false : $element.val();
+ return element.validity.badInput ? "NaN" : $element.val();
+ }
+
+ if ( isContentEditable ) {
+ val = $element.text();
+ } else {
+ val = $element.val();
+ }
+
+ if ( type === "file" ) {
+
+ // Modern browser (chrome & safari)
+ if ( val.substr( 0, 12 ) === "C:\\fakepath\\" ) {
+ return val.substr( 12 );
+ }
+
+ // Legacy browsers
+ // Unix-based path
+ idx = val.lastIndexOf( "/" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Windows-based path
+ idx = val.lastIndexOf( "\\" );
+ if ( idx >= 0 ) {
+ return val.substr( idx + 1 );
+ }
+
+ // Just the file name
+ return val;
}
- val = $element.val();
if ( typeof val === "string" ) {
- return val.replace(/\r/g, "" );
+ return val.replace( /\r/g, "" );
}
return val;
},
@@ -627,18 +769,35 @@ $.extend( $.validator, {
var rules = $( element ).rules(),
rulesCount = $.map( rules, function( n, i ) {
return i;
- }).length,
+ } ).length,
dependencyMismatch = false,
val = this.elementValue( element ),
- result, method, rule;
+ result, method, rule, normalizer;
+
+ // Prioritize the local normalizer defined for this element over the global one
+ // if the former exists, otherwise user the global one in case it exists.
+ if ( typeof rules.normalizer === "function" ) {
+ normalizer = rules.normalizer;
+ } else if ( typeof this.settings.normalizer === "function" ) {
+ normalizer = this.settings.normalizer;
+ }
+
+ // If normalizer is defined, then call it to retreive the changed value instead
+ // of using the real one.
+ // Note that `this` in the normalizer is `element`.
+ if ( normalizer ) {
+ val = normalizer.call( element, val );
+
+ // Delete the normalizer from rules to avoid treating it as a pre-defined method.
+ delete rules.normalizer;
+ }
for ( method in rules ) {
rule = { method: method, parameters: rules[ method ] };
try {
-
result = $.validator.methods[ method ].call( this, val, element, rule.parameters );
- // if a method indicates that the field is optional and therefore valid,
+ // If a method indicates that the field is optional and therefore valid,
// don't mark it as valid when there are no other rules
if ( result === "dependency-mismatch" && rulesCount === 1 ) {
dependencyMismatch = true;
@@ -675,7 +834,7 @@ $.extend( $.validator, {
return true;
},
- // return the custom message for the given element and validation method
+ // Return the custom message for the given element and validation method
// specified in the element's HTML5 data attribute
// return the generic message if present and no method specific message is present
customDataMessage: function( element, method ) {
@@ -683,15 +842,15 @@ $.extend( $.validator, {
method.substring( 1 ).toLowerCase() ) || $( element ).data( "msg" );
},
- // return the custom message for the given element name and validation method
+ // Return the custom message for the given element name and validation method
customMessage: function( name, method ) {
var m = this.settings.messages[ name ];
- return m && ( m.constructor === String ? m : m[ method ]);
+ return m && ( m.constructor === String ? m : m[ method ] );
},
- // return the first defined argument, allowing empty strings
+ // Return the first defined argument, allowing empty strings
findDefined: function() {
- for ( var i = 0; i < arguments.length; i++) {
+ for ( var i = 0; i < arguments.length; i++ ) {
if ( arguments[ i ] !== undefined ) {
return arguments[ i ];
}
@@ -699,30 +858,47 @@ $.extend( $.validator, {
return undefined;
},
- defaultMessage: function( element, method ) {
- return this.findDefined(
- this.customMessage( element.name, method ),
- this.customDataMessage( element, method ),
- // title is never undefined, so handle empty string as undefined
- !this.settings.ignoreTitle && element.title || undefined,
- $.validator.messages[ method ],
- "Warning: No message defined for " + element.name + ""
- );
- },
+ // The second parameter 'rule' used to be a string, and extended to an object literal
+ // of the following form:
+ // rule = {
+ // method: "method name",
+ // parameters: "the given method parameters"
+ // }
+ //
+ // The old behavior still supported, kept to maintain backward compatibility with
+ // old code, and will be removed in the next major release.
+ defaultMessage: function( element, rule ) {
+ if ( typeof rule === "string" ) {
+ rule = { method: rule };
+ }
- formatAndAdd: function( element, rule ) {
- var message = this.defaultMessage( element, rule.method ),
+ var message = this.findDefined(
+ this.customMessage( element.name, rule.method ),
+ this.customDataMessage( element, rule.method ),
+
+ // 'title' is never undefined, so handle empty string as undefined
+ !this.settings.ignoreTitle && element.title || undefined,
+ $.validator.messages[ rule.method ],
+ "Warning: No message defined for " + element.name + ""
+ ),
theregex = /\$?\{(\d+)\}/g;
if ( typeof message === "function" ) {
message = message.call( this, rule.parameters, element );
} else if ( theregex.test( message ) ) {
message = $.validator.format( message.replace( theregex, "{$1}" ), rule.parameters );
}
- this.errorList.push({
+
+ return message;
+ },
+
+ formatAndAdd: function( element, rule ) {
+ var message = this.defaultMessage( element, rule );
+
+ this.errorList.push( {
message: message,
element: element,
method: rule.method
- });
+ } );
this.errorMap[ element.name ] = message;
this.submitted[ element.name ] = message;
@@ -767,23 +943,27 @@ $.extend( $.validator, {
},
invalidElements: function() {
- return $( this.errorList ).map(function() {
+ return $( this.errorList ).map( function() {
return this.element;
- });
+ } );
},
showLabel: function( element, message ) {
- var place, group, errorID,
+ var place, group, errorID, v,
error = this.errorsFor( element ),
elementID = this.idOrName( element ),
describedBy = $( element ).attr( "aria-describedby" );
+
if ( error.length ) {
- // refresh error/success class
+
+ // Refresh error/success class
error.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
- // replace message on existing label
+
+ // Replace message on existing label
error.html( message );
} else {
- // create error element
+
+ // Create error element
error = $( "<" + this.settings.errorElement + ">" )
.attr( "id", elementID + "-error" )
.addClass( this.settings.errorClass )
@@ -792,31 +972,35 @@ $.extend( $.validator, {
// Maintain reference to the element to be placed into the DOM
place = error;
if ( this.settings.wrapper ) {
- // make sure the element is visible, even in IE
+
+ // Make sure the element is visible, even in IE
// actually showing the wrapped element is handled elsewhere
place = error.hide().show().wrap( "<" + this.settings.wrapper + "/>" ).parent();
}
if ( this.labelContainer.length ) {
this.labelContainer.append( place );
} else if ( this.settings.errorPlacement ) {
- this.settings.errorPlacement( place, $( element ) );
+ this.settings.errorPlacement.call( this, place, $( element ) );
} else {
place.insertAfter( element );
}
// Link error back to the element
if ( error.is( "label" ) ) {
+
// If the error is a label, then associate using 'for'
error.attr( "for", elementID );
- } else if ( error.parents( "label[for='" + elementID + "']" ).length === 0 ) {
+
// If the element is not a child of an associated label, then it's necessary
// to explicitly apply aria-describedby
+ } else if ( error.parents( "label[for='" + this.escapeCssMeta( elementID ) + "']" ).length === 0 ) {
+ errorID = error.attr( "id" );
- errorID = error.attr( "id" ).replace( /(:|\.|\[|\]|\$)/g, "\\$1");
// Respect existing non-error aria-describedby
if ( !describedBy ) {
describedBy = errorID;
- } else if ( !describedBy.match( new RegExp( "\\b" + errorID + "\\b" ) ) ) {
+ } else if ( !describedBy.match( new RegExp( "\\b" + this.escapeCssMeta( errorID ) + "\\b" ) ) ) {
+
// Add to end of list if not already present
describedBy += " " + errorID;
}
@@ -825,12 +1009,13 @@ $.extend( $.validator, {
// If this element is grouped, then assign to all elements in the same group
group = this.groups[ element.name ];
if ( group ) {
- $.each( this.groups, function( name, testgroup ) {
+ v = this;
+ $.each( v.groups, function( name, testgroup ) {
if ( testgroup === group ) {
- $( "[name='" + name + "']", this.currentForm )
+ $( "[name='" + v.escapeCssMeta( name ) + "']", v.currentForm )
.attr( "aria-describedby", error.attr( "id" ) );
}
- });
+ } );
}
}
}
@@ -846,19 +1031,32 @@ $.extend( $.validator, {
},
errorsFor: function( element ) {
- var name = this.idOrName( element ),
+ var name = this.escapeCssMeta( this.idOrName( element ) ),
describer = $( element ).attr( "aria-describedby" ),
selector = "label[for='" + name + "'], label[for='" + name + "'] *";
- // aria-describedby should directly reference the error element
+ // 'aria-describedby' should directly reference the error element
if ( describer ) {
- selector = selector + ", #" + describer.replace( /\s+/g, ", #" );
+ selector = selector + ", #" + this.escapeCssMeta( describer )
+ .replace( /\s+/g, ", #" );
}
+
return this
.errors()
.filter( selector );
},
+ // See https://api.jquery.com/category/selectors/, for CSS
+ // meta-characters that should be escaped in order to be used with JQuery
+ // as a literal part of a name/id or any selector.
+ escapeCssMeta: function( string ) {
+ if ( string === undefined ) {
+ return "";
+ }
+
+ return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
+ },
+
idOrName: function( element ) {
return this.groups[ element.name ] || ( this.checkable( element ) ? element.name : element.id || element.name );
},
@@ -879,7 +1077,7 @@ $.extend( $.validator, {
},
findByName: function( name ) {
- return $( this.currentForm ).find( "[name='" + name + "']" );
+ return $( this.currentForm ).find( "[name='" + this.escapeCssMeta( name ) + "']" );
},
getLength: function( value, element ) {
@@ -895,7 +1093,7 @@ $.extend( $.validator, {
},
depend: function( param, element ) {
- return this.dependTypes[typeof param] ? this.dependTypes[typeof param]( param, element ) : true;
+ return this.dependTypes[ typeof param ] ? this.dependTypes[ typeof param ]( param, element ) : true;
},
dependTypes: {
@@ -918,41 +1116,70 @@ $.extend( $.validator, {
startRequest: function( element ) {
if ( !this.pending[ element.name ] ) {
this.pendingRequest++;
+ $( element ).addClass( this.settings.pendingClass );
this.pending[ element.name ] = true;
}
},
stopRequest: function( element, valid ) {
this.pendingRequest--;
- // sometimes synchronization fails, make sure pendingRequest is never < 0
+
+ // Sometimes synchronization fails, make sure pendingRequest is never < 0
if ( this.pendingRequest < 0 ) {
this.pendingRequest = 0;
}
delete this.pending[ element.name ];
- if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
- $( this.currentForm ).submit();
+ $( element ).removeClass( this.settings.pendingClass );
+ if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
+ $( this.currentForm ).trigger( "submit" );
+
+ // Remove the hidden input that was used as a replacement for the
+ // missing submit button. The hidden input is added by `handle()`
+ // to ensure that the value of the used submit button is passed on
+ // for scripted submits triggered by this method
+ if ( this.submitButton ) {
+ $( "input:hidden[name='" + this.submitButton.name + "']", this.currentForm ).remove();
+ }
+
this.formSubmitted = false;
- } else if (!valid && this.pendingRequest === 0 && this.formSubmitted ) {
- $( this.currentForm ).triggerHandler( "invalid-form", [ this ]);
+ } else if ( !valid && this.pendingRequest === 0 && this.formSubmitted ) {
+ $( this.currentForm ).triggerHandler( "invalid-form", [ this ] );
this.formSubmitted = false;
}
},
- previousValue: function( element ) {
+ previousValue: function( element, method ) {
+ method = typeof method === "string" && method || "remote";
+
return $.data( element, "previousValue" ) || $.data( element, "previousValue", {
old: null,
valid: true,
- message: this.defaultMessage( element, "remote" )
- });
+ message: this.defaultMessage( element, { method: method } )
+ } );
},
- // cleans up all forms and elements, removes validator-specific events
+ // Cleans up all forms and elements, removes validator-specific events
destroy: function() {
this.resetForm();
$( this.currentForm )
.off( ".validate" )
- .removeData( "validator" );
+ .removeData( "validator" )
+ .find( ".validate-equalTo-blur" )
+ .off( ".validate-equalTo" )
+ .removeClass( "validate-equalTo-blur" )
+ .find( ".validate-lessThan-blur" )
+ .off( ".validate-lessThan" )
+ .removeClass( "validate-lessThan-blur" )
+ .find( ".validate-lessThanEqual-blur" )
+ .off( ".validate-lessThanEqual" )
+ .removeClass( "validate-lessThanEqual-blur" )
+ .find( ".validate-greaterThanEqual-blur" )
+ .off( ".validate-greaterThanEqual" )
+ .removeClass( "validate-greaterThanEqual-blur" )
+ .find( ".validate-greaterThan-blur" )
+ .off( ".validate-greaterThan" )
+ .removeClass( "validate-greaterThan-blur" );
}
},
@@ -983,18 +1210,18 @@ $.extend( $.validator, {
if ( classes ) {
$.each( classes.split( " " ), function() {
if ( this in $.validator.classRuleSettings ) {
- $.extend( rules, $.validator.classRuleSettings[ this ]);
+ $.extend( rules, $.validator.classRuleSettings[ this ] );
}
- });
+ } );
}
return rules;
},
normalizeAttributeRule: function( rules, type, method, value ) {
- // convert the value to a number for number inputs, and for text for backwards compability
+ // Convert the value to a number for number inputs, and for text for backwards compability
// allows type="date" and others to be compared as strings
- if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
+ if ( /min|max|step/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
value = Number( value );
// Support Opera Mini, which returns NaN for undefined minlength
@@ -1007,9 +1234,9 @@ $.extend( $.validator, {
rules[ method ] = value;
} else if ( type === method && type !== "range" ) {
- // exception: the jquery validate 'range' method
+ // Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
- rules[ method ] = true;
+ rules[ type === "date" ? "dateISO" : method ] = true;
}
},
@@ -1021,7 +1248,7 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
- // support for in both html5 and older browsers
+ // Support for in both html5 and older browsers
if ( method === "required" ) {
value = element.getAttribute( method );
@@ -1031,7 +1258,7 @@ $.extend( $.validator, {
value = true;
}
- // force non-HTML5 browsers to return bool
+ // Force non-HTML5 browsers to return bool
value = !!value;
} else {
value = $element.attr( method );
@@ -1040,7 +1267,7 @@ $.extend( $.validator, {
this.normalizeAttributeRule( rules, type, method, value );
}
- // maxlength may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
+ // 'maxlength' may be returned as -1, 2147483647 ( IE ) and 524288 ( safari ) for text inputs
if ( rules.maxlength && /-1|2147483647|524288/.test( rules.maxlength ) ) {
delete rules.maxlength;
}
@@ -1056,6 +1283,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
+
+ // Cast empty attributes like `data-rule-required` to `true`
+ if ( value === "" ) {
+ value = true;
+ }
+
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@@ -1072,9 +1305,11 @@ $.extend( $.validator, {
},
normalizeRules: function( rules, element ) {
- // handle dependency check
+
+ // Handle dependency check
$.each( rules, function( prop, val ) {
- // ignore rule when param is explicitly false, eg. required:false
+
+ // Ignore rule when param is explicitly false, eg. required:false
if ( val === false ) {
delete rules[ prop ];
return;
@@ -1092,36 +1327,38 @@ $.extend( $.validator, {
if ( keepRule ) {
rules[ prop ] = val.param !== undefined ? val.param : true;
} else {
+ $.data( element.form, "validator" ).resetElements( $( element ) );
delete rules[ prop ];
}
}
- });
+ } );
- // evaluate parameters
+ // Evaluate parameters
$.each( rules, function( rule, parameter ) {
- rules[ rule ] = $.isFunction( parameter ) ? parameter( element ) : parameter;
- });
+ rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
+ } );
- // clean number parameters
- $.each([ "minlength", "maxlength" ], function() {
+ // Clean number parameters
+ $.each( [ "minlength", "maxlength" ], function() {
if ( rules[ this ] ) {
rules[ this ] = Number( rules[ this ] );
}
- });
- $.each([ "rangelength", "range" ], function() {
+ } );
+ $.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
- if ( $.isArray( rules[ this ] ) ) {
- rules[ this ] = [ Number( rules[ this ][ 0 ]), Number( rules[ this ][ 1 ] ) ];
+ if ( Array.isArray( rules[ this ] ) ) {
+ rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
- parts = rules[ this ].replace(/[\[\]]/g, "" ).split( /[\s,]+/ );
- rules[ this ] = [ Number( parts[ 0 ]), Number( parts[ 1 ] ) ];
+ parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
+ rules[ this ] = [ Number( parts[ 0 ] ), Number( parts[ 1 ] ) ];
}
}
- });
+ } );
if ( $.validator.autoCreateRanges ) {
- // auto-create ranges
+
+ // Auto-create ranges
if ( rules.min != null && rules.max != null ) {
rules.range = [ rules.min, rules.max ];
delete rules.min;
@@ -1143,13 +1380,13 @@ $.extend( $.validator, {
var transformed = {};
$.each( data.split( /\s/ ), function() {
transformed[ this ] = true;
- });
+ } );
data = transformed;
}
return data;
},
- // http://jqueryvalidation.org/jQuery.validator.addMethod/
+ // https://jqueryvalidation.org/jQuery.validator.addMethod/
addMethod: function( name, method, message ) {
$.validator.methods[ name ] = method;
$.validator.messages[ name ] = message !== undefined ? message : $.validator.messages[ name ];
@@ -1158,27 +1395,31 @@ $.extend( $.validator, {
}
},
+ // https://jqueryvalidation.org/jQuery.validator.methods/
methods: {
- // http://jqueryvalidation.org/required-method/
+ // https://jqueryvalidation.org/required-method/
required: function( value, element, param ) {
- // check if dependency is met
+
+ // Check if dependency is met
if ( !this.depend( param, element ) ) {
return "dependency-mismatch";
}
if ( element.nodeName.toLowerCase() === "select" ) {
- // could be an array for select-multiple or a string, both are fine this way
+
+ // Could be an array for select-multiple or a string, both are fine this way
var val = $( element ).val();
return val && val.length > 0;
}
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
- return value.length > 0;
+ return value !== undefined && value !== null && value.length > 0;
},
- // http://jqueryvalidation.org/email-method/
+ // https://jqueryvalidation.org/email-method/
email: function( value, element ) {
+
// From https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
// Retrieved 2014-01-14
// If you have a problem with this implementation, report a bug against the above spec
@@ -1186,142 +1427,161 @@ $.extend( $.validator, {
return this.optional( element ) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test( value );
},
- // http://jqueryvalidation.org/url-method/
+ // https://jqueryvalidation.org/url-method/
url: function( value, element ) {
// Copyright (c) 2010-2013 Diego Perini, MIT licensed
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
- return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
+ return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},
- // http://jqueryvalidation.org/date-method/
- date: function( value, element ) {
- return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
- },
+ // https://jqueryvalidation.org/date-method/
+ date: ( function() {
+ var called = false;
+
+ return function( value, element ) {
+ if ( !called ) {
+ called = true;
+ if ( this.settings.debug && window.console ) {
+ console.warn(
+ "The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
+ "Please don't use it, since it relies on the Date constructor, which\n" +
+ "behaves very differently across browsers and locales. Use `dateISO`\n" +
+ "instead or one of the locale specific methods in `localizations/`\n" +
+ "and `additional-methods.js`."
+ );
+ }
+ }
+
+ return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
+ };
+ }() ),
- // http://jqueryvalidation.org/dateISO-method/
+ // https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
return this.optional( element ) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test( value );
},
- // http://jqueryvalidation.org/number-method/
+ // https://jqueryvalidation.org/number-method/
number: function( value, element ) {
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
},
- // http://jqueryvalidation.org/digits-method/
+ // https://jqueryvalidation.org/digits-method/
digits: function( value, element ) {
return this.optional( element ) || /^\d+$/.test( value );
},
- // http://jqueryvalidation.org/creditcard-method/
- // based on http://en.wikipedia.org/wiki/Luhn_algorithm
- creditcard: function( value, element ) {
- if ( this.optional( element ) ) {
- return "dependency-mismatch";
- }
- // accept only spaces, digits and dashes
- if ( /[^0-9 \-]+/.test( value ) ) {
- return false;
- }
- var nCheck = 0,
- nDigit = 0,
- bEven = false,
- n, cDigit;
-
- value = value.replace( /\D/g, "" );
-
- // Basing min and max length on
- // http://developer.ean.com/general_info/Valid_Credit_Card_Types
- if ( value.length < 13 || value.length > 19 ) {
- return false;
- }
-
- for ( n = value.length - 1; n >= 0; n--) {
- cDigit = value.charAt( n );
- nDigit = parseInt( cDigit, 10 );
- if ( bEven ) {
- if ( ( nDigit *= 2 ) > 9 ) {
- nDigit -= 9;
- }
- }
- nCheck += nDigit;
- bEven = !bEven;
- }
-
- return ( nCheck % 10 ) === 0;
- },
-
- // http://jqueryvalidation.org/minlength-method/
+ // https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},
- // http://jqueryvalidation.org/maxlength-method/
+ // https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},
- // http://jqueryvalidation.org/rangelength-method/
+ // https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
- var length = $.isArray( value ) ? value.length : this.getLength( value, element );
+ var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},
- // http://jqueryvalidation.org/min-method/
+ // https://jqueryvalidation.org/min-method/
min: function( value, element, param ) {
return this.optional( element ) || value >= param;
},
- // http://jqueryvalidation.org/max-method/
+ // https://jqueryvalidation.org/max-method/
max: function( value, element, param ) {
return this.optional( element ) || value <= param;
},
- // http://jqueryvalidation.org/range-method/
+ // https://jqueryvalidation.org/range-method/
range: function( value, element, param ) {
return this.optional( element ) || ( value >= param[ 0 ] && value <= param[ 1 ] );
},
- // http://jqueryvalidation.org/equalTo-method/
+ // https://jqueryvalidation.org/step-method/
+ step: function( value, element, param ) {
+ var type = $( element ).attr( "type" ),
+ errorMessage = "Step attribute on input type " + type + " is not supported.",
+ supportedTypes = [ "text", "number", "range" ],
+ re = new RegExp( "\\b" + type + "\\b" ),
+ notSupported = type && !re.test( supportedTypes.join() ),
+ decimalPlaces = function( num ) {
+ var match = ( "" + num ).match( /(?:\.(\d+))?$/ );
+ if ( !match ) {
+ return 0;
+ }
+
+ // Number of digits right of decimal point.
+ return match[ 1 ] ? match[ 1 ].length : 0;
+ },
+ toInt = function( num ) {
+ return Math.round( num * Math.pow( 10, decimals ) );
+ },
+ valid = true,
+ decimals;
+
+ // Works only for text, number and range input types
+ // TODO find a way to support input types date, datetime, datetime-local, month, time and week
+ if ( notSupported ) {
+ throw new Error( errorMessage );
+ }
+
+ decimals = decimalPlaces( param );
+
+ // Value can't have too many decimals
+ if ( decimalPlaces( value ) > decimals || toInt( value ) % toInt( param ) !== 0 ) {
+ valid = false;
+ }
+
+ return this.optional( element ) || valid;
+ },
+
+ // https://jqueryvalidation.org/equalTo-method/
equalTo: function( value, element, param ) {
- // bind to the blur event of the target in order to revalidate whenever the target field is updated
- // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
+
+ // Bind to the blur event of the target in order to revalidate whenever the target field is updated
var target = $( param );
- if ( this.settings.onfocusout ) {
- target.off( ".validate-equalTo" ).on( "blur.validate-equalTo", function() {
+ if ( this.settings.onfocusout && target.not( ".validate-equalTo-blur" ).length ) {
+ target.addClass( "validate-equalTo-blur" ).on( "blur.validate-equalTo", function() {
$( element ).valid();
- });
+ } );
}
return value === target.val();
},
- // http://jqueryvalidation.org/remote-method/
- remote: function( value, element, param ) {
+ // https://jqueryvalidation.org/remote-method/
+ remote: function( value, element, param, method ) {
if ( this.optional( element ) ) {
return "dependency-mismatch";
}
- var previous = this.previousValue( element ),
- validator, data;
+ method = typeof method === "string" && method || "remote";
+
+ var previous = this.previousValue( element, method ),
+ validator, data, optionDataString;
- if (!this.settings.messages[ element.name ] ) {
+ if ( !this.settings.messages[ element.name ] ) {
this.settings.messages[ element.name ] = {};
}
- previous.originalMessage = this.settings.messages[ element.name ].remote;
- this.settings.messages[ element.name ].remote = previous.message;
+ previous.originalMessage = previous.originalMessage || this.settings.messages[ element.name ][ method ];
+ this.settings.messages[ element.name ][ method ] = previous.message;
param = typeof param === "string" && { url: param } || param;
-
- if ( previous.old === value ) {
+ optionDataString = $.param( $.extend( { data: value }, param.data ) );
+ if ( previous.old === optionDataString ) {
return previous.valid;
}
- previous.old = value;
+ previous.old = optionDataString;
validator = this;
this.startRequest( element );
data = {};
@@ -1336,18 +1596,19 @@ $.extend( $.validator, {
var valid = response === true || response === "true",
errors, message, submitted;
- validator.settings.messages[ element.name ].remote = previous.originalMessage;
+ validator.settings.messages[ element.name ][ method ] = previous.originalMessage;
if ( valid ) {
submitted = validator.formSubmitted;
- validator.prepareElement( element );
+ validator.resetInternals();
+ validator.toHide = validator.errorsFor( element );
validator.formSubmitted = submitted;
validator.successList.push( element );
- delete validator.invalid[ element.name ];
+ validator.invalid[ element.name ] = false;
validator.showErrors();
} else {
errors = {};
- message = response || validator.defaultMessage( element, "remote" );
- errors[ element.name ] = previous.message = $.isFunction( message ) ? message( value ) : message;
+ message = response || validator.defaultMessage( element, { method: method, parameters: value } );
+ errors[ element.name ] = previous.message = message;
validator.invalid[ element.name ] = true;
validator.showErrors( errors );
}
@@ -1359,40 +1620,42 @@ $.extend( $.validator, {
}
}
-});
+} );
-// ajax mode: abort
+// Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
var pendingRequests = {},
ajax;
+
// Use a prefilter if available (1.5+)
if ( $.ajaxPrefilter ) {
- $.ajaxPrefilter(function( settings, _, xhr ) {
+ $.ajaxPrefilter( function( settings, _, xhr ) {
var port = settings.port;
if ( settings.mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = xhr;
+ pendingRequests[ port ] = xhr;
}
- });
+ } );
} else {
+
// Proxy ajax
ajax = $.ajax;
$.ajax = function( settings ) {
var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
port = ( "port" in settings ? settings : $.ajaxSettings ).port;
if ( mode === "abort" ) {
- if ( pendingRequests[port] ) {
- pendingRequests[port].abort();
+ if ( pendingRequests[ port ] ) {
+ pendingRequests[ port ].abort();
}
- pendingRequests[port] = ajax.apply(this, arguments);
- return pendingRequests[port];
+ pendingRequests[ port ] = ajax.apply( this, arguments );
+ return pendingRequests[ port ];
}
- return ajax.apply(this, arguments);
+ return ajax.apply( this, arguments );
};
}
-
+return $;
}));
\ No newline at end of file
diff --git a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
index 643837b90a5b..442a41317af9 100644
--- a/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
+++ b/src/Security/samples/StaticFilesAuth/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
- * http://jqueryvalidation.org/
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
-!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
\ No newline at end of file
+/*! jQuery Validation Plugin - v1.19.5 - 7/1/2022
+ * https://jqueryvalidation.org/
+ * Copyright (c) 2022 Jörn Zaefferer; Licensed MIT */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!(c.settings.submitHandler&&!c.settings.debug)||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0],k="undefined"!=typeof this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=j&&(!j.form&&k&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}});var b=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};a.extend(a.expr.pseudos||a.expr[":"],{blank:function(c){return!b(""+a(c).val())},filled:function(c){var d=a(c).val();return null!==d&&!!b(""+d)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");if(!this.form&&c&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name")),d===this.form){var e=a.data(this.form,"validator"),f="on"+b.type.replace(/^validate/,""),g=e.settings;g[f]&&!a(this).is(g.ignore)&&g[f].call(e,this,b)}}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.currentForm,e=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){e[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name"),e="undefined"!=typeof a(this).attr("contenteditable")&&"false"!==a(this).attr("contenteditable");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),e&&(this.form=a(this).closest("form")[0],this.name=d),this.form===b.currentForm&&(!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0))})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type,g="undefined"!=typeof e.attr("contenteditable")&&"false"!==e.attr("contenteditable");return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=g?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);"function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f&&(j=f.call(b,j),delete g.normalizer);for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+""),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return void 0===a?"":a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()&&0===this.pendingRequest?(a(this.currentForm).trigger("submit"),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a["date"===b?"dateISO":c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),""===d&&(d=!0),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(a,d){b[a]="function"==typeof d&&"normalizer"!==a?d(c):d}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var a;b[this]&&(Array.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(a=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(a[0]),Number(a[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:void 0!==b&&null!==b&&b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(){var a=!1;return function(b,c){return a||(a=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(c)||!/Invalid|NaN/.test(new Date(b).toString())}}(),dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c},maxlength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d<=c},rangelength:function(a,b,c){var d=Array.isArray(a)?a.length:this.getLength(a,b);return this.optional(b)||d>=c[0]&&d<=c[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var c,d={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,c){var e=a.port;"abort"===a.mode&&(d[e]&&d[e].abort(),d[e]=c)}):(c=a.ajax,a.ajax=function(b){var e=("mode"in b?b:a.ajaxSettings).mode,f=("port"in b?b:a.ajaxSettings).port;return"abort"===e?(d[f]&&d[f].abort(),d[f]=c.apply(this,arguments),d[f]):c.apply(this,arguments)}),a});
\ No newline at end of file
From 4343840b1ca3300633a123d531ebde9fd1af58b4 Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Sat, 30 Sep 2023 14:20:02 +0000
Subject: [PATCH 086/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20230930.2
Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport
From Version 6.0.23-servicing.23479.5 -> To Version 6.0.23-servicing.23480.2
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 32 ++++++++++++++++----------------
eng/Versions.props | 4 ++--
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 22c8c5eb5bb8..d37b12d22a3c 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -32,7 +32,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 160770633949..86b6b375a58b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
- https://github.com/dotnet/runtime
- 301ba1ee5d1cfff28a8866924733603f3adf4936
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ e0f0de876a67755a2c6cd2dc730c13f5959bdea8
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -246,32 +246,32 @@
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
- https://github.com/dotnet/runtime
- 301ba1ee5d1cfff28a8866924733603f3adf4936
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ e0f0de876a67755a2c6cd2dc730c13f5959bdea8
- https://github.com/dotnet/runtime
- 301ba1ee5d1cfff28a8866924733603f3adf4936
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ e0f0de876a67755a2c6cd2dc730c13f5959bdea8
- https://github.com/dotnet/runtime
- 301ba1ee5d1cfff28a8866924733603f3adf4936
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ e0f0de876a67755a2c6cd2dc730c13f5959bdea8
- https://github.com/dotnet/runtime
- 301ba1ee5d1cfff28a8866924733603f3adf4936
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ e0f0de876a67755a2c6cd2dc730c13f5959bdea8
- https://github.com/dotnet/runtime
- 301ba1ee5d1cfff28a8866924733603f3adf4936
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ e0f0de876a67755a2c6cd2dc730c13f5959bdea8
-
- https://github.com/dotnet/runtime
- 301ba1ee5d1cfff28a8866924733603f3adf4936
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ e0f0de876a67755a2c6cd2dc730c13f5959bdea8
diff --git a/eng/Versions.props b/eng/Versions.props
index 5c43c68802dd..a17f408f20d2 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.23
6.0.23
6.0.23
- 6.0.23-servicing.23479.5
+ 6.0.23-servicing.23480.2
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.23-servicing.23479.5
+ 6.0.23-servicing.23480.2
6.0.1
6.0.0
6.0.2
From f665cb05792a3c832982dfdc06f4b46c33971dbe Mon Sep 17 00:00:00 2001
From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Date: Wed, 4 Oct 2023 09:04:42 -0700
Subject: [PATCH 087/128] Update branding to 6.0.24 (#51115)
---
eng/Versions.props | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 81189a0e17ed..84aeccf24dce 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,8 +8,8 @@
6
0
- 23
- true
+ 24
+ false
From 1a6ffea33df8ffe36c2720ee42fc091f5576d180 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 4 Oct 2023 09:18:22 -0700
Subject: [PATCH 088/128] [release/6.0] (deps): Bump src/submodules/googletest
(#51049)
Bumps [src/submodules/googletest](https://github.com/google/googletest) from `8a6feab` to `e47544a`.
- [Release notes](https://github.com/google/googletest/releases)
- [Commits](https://github.com/google/googletest/compare/8a6feabf04bec8fb125e0df0ad1195c42350725f...e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b)
---
updated-dependencies:
- dependency-name: src/submodules/googletest
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/submodules/googletest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/submodules/googletest b/src/submodules/googletest
index 8a6feabf04be..e47544ad31cb 160000
--- a/src/submodules/googletest
+++ b/src/submodules/googletest
@@ -1 +1 @@
-Subproject commit 8a6feabf04bec8fb125e0df0ad1195c42350725f
+Subproject commit e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b
From 9104f71a6e75915786f8e993fedfb333a8e39970 Mon Sep 17 00:00:00 2001
From: Mackinnon Buck
Date: Wed, 4 Oct 2023 13:36:10 -0700
Subject: [PATCH 089/128] Update EventTest.cs (#51142)
---
src/Components/test/E2ETest/Tests/EventTest.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Components/test/E2ETest/Tests/EventTest.cs b/src/Components/test/E2ETest/Tests/EventTest.cs
index 390bdcc09061..18f513720ae2 100644
--- a/src/Components/test/E2ETest/Tests/EventTest.cs
+++ b/src/Components/test/E2ETest/Tests/EventTest.cs
@@ -173,8 +173,8 @@ public void DragDrop_CanTrigger()
var actions = new Actions(Browser).DragAndDrop(input, target);
actions.Perform();
- // drop doesn't seem to trigger in Selenium. But it's sufficient to determine "any" drag event works
- Browser.Equal("dragstart,", () => output.Text);
+ // drop doesn't reliably trigger in Selenium. But it's sufficient to determine "any" drag event works
+ Browser.True(() => output.Text.StartsWith("dragstart,", StringComparison.Ordinal));
}
[Fact]
From 20f37ce93c870ec529d3370eb1ac8e8e474df15e Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 5 Oct 2023 16:54:16 -0700
Subject: [PATCH 090/128] [release/6.0] Dispose CTS in HubConnection streaming
(#51139)
* Dispose CTS in HubConnection streaming
* Apply suggestions from code review
Co-authored-by: Stephen Halter
---------
Co-authored-by: Brennan
Co-authored-by: Stephen Halter
---
.../clients/csharp/Client.Core/src/HubConnection.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs
index 7e10a4a8da86..9720baff993b 100644
--- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs
+++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs
@@ -743,7 +743,7 @@ async Task ReadChannelStream()
}
}
- return CommonStreaming(connectionState, streamId, ReadChannelStream);
+ return CommonStreaming(connectionState, streamId, ReadChannelStream, tokenSource);
}
// this is called via reflection using the `_sendIAsyncStreamItemsMethod` field
@@ -760,11 +760,14 @@ async Task ReadAsyncEnumerableStream()
}
}
- return CommonStreaming(connectionState, streamId, ReadAsyncEnumerableStream);
+ return CommonStreaming(connectionState, streamId, ReadAsyncEnumerableStream, tokenSource);
}
- private async Task CommonStreaming(ConnectionState connectionState, string streamId, Func createAndConsumeStream)
+ private async Task CommonStreaming(ConnectionState connectionState, string streamId, Func createAndConsumeStream, CancellationTokenSource cts)
{
+ // make sure we dispose the CTS created by StreamAsyncCore once streaming completes
+ using var _ = cts;
+
Log.StartingStream(_logger, streamId);
string? responseError = null;
try
From 97956e17688a7bc6a2958da867de5e1032e024eb Mon Sep 17 00:00:00 2001
From: wtgodbe
Date: Tue, 10 Oct 2023 14:41:57 -0700
Subject: [PATCH 091/128] Update baseline, SDK
---
eng/Baseline.Designer.props | 444 ++++++++++++++++++------------------
eng/Baseline.xml | 214 ++++++++---------
eng/Versions.props | 2 +-
global.json | 4 +-
4 files changed, 332 insertions(+), 332 deletions(-)
diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props
index 0b962449d9f1..0ca47e957b58 100644
--- a/eng/Baseline.Designer.props
+++ b/eng/Baseline.Designer.props
@@ -2,28 +2,28 @@
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
-
-
-
+
+
+
@@ -34,120 +34,120 @@
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
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0.22
+ 6.0.23
@@ -862,73 +862,73 @@
- 6.0.22
+ 6.0.23
-
+
-
+
-
+
- 6.0.22
+ 6.0.23
-
+
-
+
-
+
- 6.0.22
+ 6.0.23
-
+
-
+
-
+
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
@@ -957,11 +957,11 @@
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
@@ -979,13 +979,13 @@
- 6.0.22
+ 6.0.23
- 6.0.22
+ 6.0.23
-
+
\ No newline at end of file
diff --git a/eng/Baseline.xml b/eng/Baseline.xml
index 2984eef6c6e4..749cc484d04a 100644
--- a/eng/Baseline.xml
+++ b/eng/Baseline.xml
@@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele
Update this list when preparing for a new patch.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/Versions.props b/eng/Versions.props
index 2635b6b431f9..2186c0e1d1eb 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -9,7 +9,7 @@
6
0
24
- false
+ true
diff --git a/global.json b/global.json
index 4cc2acb633b1..83661f95122b 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "6.0.122"
+ "version": "6.0.123"
},
"tools": {
- "dotnet": "6.0.122",
+ "dotnet": "6.0.123",
"runtimes": {
"dotnet/x64": [
"2.1.30",
From 1dac04de588f512c4d88ccc0c1d93ed74e720300 Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Thu, 12 Oct 2023 18:14:55 +0000
Subject: [PATCH 092/128] Update dependencies from
https://github.com/dotnet/arcade build 20231011.8 (#51329)
[release/6.0] Update dependencies from dotnet/arcade
---
NuGet.config | 12 +++---
eng/Version.Details.xml | 16 ++++----
eng/Versions.props | 4 +-
eng/common/retain-build.ps1 | 45 +++++++++++++++++++++
eng/common/templates/steps/retain-build.yml | 28 +++++++++++++
global.json | 4 +-
6 files changed, 91 insertions(+), 18 deletions(-)
create mode 100644 eng/common/retain-build.ps1
create mode 100644 eng/common/templates/steps/retain-build.yml
diff --git a/NuGet.config b/NuGet.config
index d37b12d22a3c..408f809f462b 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -5,11 +5,11 @@
+
+
+
-
-
-
@@ -27,11 +27,11 @@
-
-
-
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 86b6b375a58b..a94b8356c283 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -280,22 +280,22 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
-
+
https://github.com/dotnet/arcade
- 98fd22588fbb0f407faa6a74cb1aa79031306151
+ 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
-
+
https://github.com/dotnet/arcade
- 98fd22588fbb0f407faa6a74cb1aa79031306151
+ 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
-
+
https://github.com/dotnet/arcade
- 98fd22588fbb0f407faa6a74cb1aa79031306151
+ 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
-
+
https://github.com/dotnet/arcade
- 98fd22588fbb0f407faa6a74cb1aa79031306151
+ 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
diff --git a/eng/Versions.props b/eng/Versions.props
index 2186c0e1d1eb..d20d7a658d46 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -131,8 +131,8 @@
6.0.23
6.0.23
- 6.0.0-beta.23408.5
- 6.0.0-beta.23408.5
+ 6.0.0-beta.23511.8
+ 6.0.0-beta.23511.8
+
+
-
+
@@ -25,9 +27,11 @@
-
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 3e5e74df7c07..f4ef4a82883a 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 8a56239985565dd10bd1c7a62c848d15d4474f7b
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index 16d5954780b5..f1a18c9e5a91 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.11
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
6.0.0-beta.23408.5
6.0.0-beta.23408.5
From 8e60e0f27c8a5c9b9f4ce423cd8d60485f6ed6ae Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Tue, 17 Oct 2023 00:00:17 +0000
Subject: [PATCH 094/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 10 ++--------
eng/Version.Details.xml | 28 ++++++++++++++--------------
eng/Versions.props | 14 +++++++-------
3 files changed, 23 insertions(+), 29 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 408f809f462b..8e5616ad2011 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,7 @@
-
-
-
-
+
@@ -29,10 +26,7 @@
-
-
-
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index a94b8356c283..f6f9e0eeee50 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e0f0de876a67755a2c6cd2dc730c13f5959bdea8
+ 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -245,33 +245,33 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e0f0de876a67755a2c6cd2dc730c13f5959bdea8
+ 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e0f0de876a67755a2c6cd2dc730c13f5959bdea8
+ 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e0f0de876a67755a2c6cd2dc730c13f5959bdea8
+ 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e0f0de876a67755a2c6cd2dc730c13f5959bdea8
+ 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e0f0de876a67755a2c6cd2dc730c13f5959bdea8
+ 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- e0f0de876a67755a2c6cd2dc730c13f5959bdea8
+ 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
diff --git a/eng/Versions.props b/eng/Versions.props
index d20d7a658d46..96291ad23966 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23-servicing.23480.2
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24-servicing.23516.12
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.23-servicing.23480.2
+ 6.0.24-servicing.23516.12
6.0.1
6.0.0
6.0.2
From 2dc4c74371570fe201a9cc6194b07ec2daabcf86 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Tue, 17 Oct 2023 04:38:51 +0000
Subject: [PATCH 095/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 8e5616ad2011..f159d233fa69 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index f6f9e0eeee50..adf69a1fd576 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
+ 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
+ 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
+ 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
+ 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
+ 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
+ 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 9cfaa835e9d761a3433687d004c416e0f2b4f2a6
+ 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
diff --git a/eng/Versions.props b/eng/Versions.props
index 96291ad23966..83e266fb1fe8 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.24
6.0.24
6.0.24
- 6.0.24-servicing.23516.12
+ 6.0.24-servicing.23516.20
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.24-servicing.23516.12
+ 6.0.24-servicing.23516.20
6.0.1
6.0.0
6.0.2
From caada2338902a9524eb87fdab853eba77db52974 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Tue, 17 Oct 2023 09:52:08 +0000
Subject: [PATCH 096/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 22 +++++++++++-----------
eng/Versions.props | 6 +++---
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index f159d233fa69..2203d82b14cc 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index adf69a1fd576..57ecbbb3882b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -233,9 +233,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- c76ac565499f3e7c657126d46c00b67a0d74832c
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
https://github.com/dotnet/runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 206ffb172ce82b8815f6c6cc6d8ec991cdf34d8f
+ cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
diff --git a/eng/Versions.props b/eng/Versions.props
index 83e266fb1fe8..be8559f12092 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.24
6.0.24
6.0.24
- 6.0.24-servicing.23516.20
+ 6.0.24-servicing.23516.31
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.24-servicing.23516.20
+ 6.0.24-servicing.23516.31
6.0.1
6.0.0
6.0.2
@@ -117,7 +117,7 @@
6.0.1
6.0.1
6.0.0
- 6.0.8
+ 6.0.9
6.0.0
6.0.11
From c81c53cd507ae3699ef60e6a02be0b1984d00452 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 18 Oct 2023 06:06:39 +0000
Subject: [PATCH 097/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 20 ++++++++++----------
eng/Versions.props | 4 ++--
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 2203d82b14cc..e703fa482bb4 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 57ecbbb3882b..1f63cdbf5a90 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -235,7 +235,7 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
https://github.com/dotnet/runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- cb5bcd2b394eaf9f079b67ab980e193e1d1ccadd
+ 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
diff --git a/eng/Versions.props b/eng/Versions.props
index be8559f12092..4112fa5aa552 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.24
6.0.24
6.0.24
- 6.0.24-servicing.23516.31
+ 6.0.24-servicing.23517.17
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.24-servicing.23516.31
+ 6.0.24-servicing.23517.17
6.0.1
6.0.0
6.0.2
From 9f5e433f881aea5968fc5a9acb2c5131f3956794 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Thu, 19 Oct 2023 06:42:17 +0000
Subject: [PATCH 098/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 30 +++++++++++++++---------------
eng/Versions.props | 14 +++++++-------
3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index e703fa482bb4..89f9578cdf0b 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 1f63cdbf5a90..a4b1d9b13864 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -235,7 +235,7 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
https://github.com/dotnet/runtime
@@ -245,33 +245,33 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 5f9d5a6664bfe9bf832babe09b13a475b9e7f479
+ d7b9518372d8e9988e62154d73453e7df508df2c
diff --git a/eng/Versions.props b/eng/Versions.props
index 4112fa5aa552..999071ab1575 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24-servicing.23517.17
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25-servicing.23518.22
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.24-servicing.23517.17
+ 6.0.25-servicing.23518.22
6.0.1
6.0.0
6.0.2
From d025c79968d63df02830f9b9914707db4d9f02d5 Mon Sep 17 00:00:00 2001
From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Date: Thu, 19 Oct 2023 10:33:35 -0700
Subject: [PATCH 099/128] Update branding to 6.0.25 (#51478)
---
eng/Versions.props | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index d20d7a658d46..89520a167dce 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,8 +8,8 @@
6
0
- 24
- true
+ 25
+ false
From ad15e08a98e1d3697d4577631c6ffc1bfb07e904 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Fri, 20 Oct 2023 04:15:13 +0000
Subject: [PATCH 100/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 20 ++++++++++----------
eng/Versions.props | 4 ++--
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 89f9578cdf0b..8b9bbf7244d2 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index a4b1d9b13864..0b56617c933e 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -235,7 +235,7 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
https://github.com/dotnet/runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- d7b9518372d8e9988e62154d73453e7df508df2c
+ 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
diff --git a/eng/Versions.props b/eng/Versions.props
index cc056108ef85..157bc9422314 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.25
6.0.25
6.0.25
- 6.0.25-servicing.23518.22
+ 6.0.25-servicing.23519.12
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.25-servicing.23518.22
+ 6.0.25-servicing.23519.12
6.0.1
6.0.0
6.0.2
From b00de4a0a9af86be6fc4891431d5c75cbe81bc37 Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Mon, 23 Oct 2023 18:00:36 +0000
Subject: [PATCH 101/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20231012.12
dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools
From Version 6.0.23 -> To Version 6.0.24
---
NuGet.config | 2 ++
eng/Version.Details.xml | 48 ++++++++++++++++++++---------------------
eng/Versions.props | 16 +++++++-------
3 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 8b9bbf7244d2..5b7e24d92a99 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,6 +7,7 @@
+
@@ -24,6 +25,7 @@
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 0b56617c933e..14e364efe3cf 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
-
- https://github.com/dotnet/efcore
- 50a6896cca24b06e154bdf652c2e7aefd0dfb7a1
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
+ 301a5c190943bb62e8e783a29976059ac2e6ea9c
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index 157bc9422314..96593db462a5 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.11
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
- 6.0.23
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
+ 6.0.24
6.0.0-beta.23511.8
6.0.0-beta.23511.8
From 813d42072c04dd128265b4b64800bf7c2b83f07a Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Mon, 23 Oct 2023 19:48:20 +0000
Subject: [PATCH 102/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20231023.12
dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools
From Version 6.0.24 -> To Version 6.0.25
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 32 ++++++++++++++++----------------
eng/Versions.props | 16 ++++++++--------
3 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 5b7e24d92a99..080af6f8c196 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 14e364efe3cf..50a71707b430 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 301a5c190943bb62e8e783a29976059ac2e6ea9c
+ ebac2284d2825218fa91c188a3f428f244aa6fe3
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index 96593db462a5..b5bf1899ea21 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.11
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24
- 6.0.24
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25
+ 6.0.25
6.0.0-beta.23511.8
6.0.0-beta.23511.8
From 8c700991c0e38fc14340f38546c5c9f1d39762f4 Mon Sep 17 00:00:00 2001
From: vseanreesermsft <78103370+vseanreesermsft@users.noreply.github.com>
Date: Wed, 8 Nov 2023 11:20:54 -0800
Subject: [PATCH 103/128] Update branding to 6.0.26 (#51916)
---
eng/Versions.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 89520a167dce..39e001c9bc8e 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -8,7 +8,7 @@
6
0
- 25
+ 26
false
+ 1.10.2
0.9.9
0.13.0
4.2.1
diff --git a/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj b/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj
index d879154fed0e..596b70a8afc5 100644
--- a/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj
+++ b/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj
@@ -20,6 +20,7 @@
+
diff --git a/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj
index ca9fb454c381..91c5ec3c5fe4 100644
--- a/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj
+++ b/src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj
@@ -15,6 +15,7 @@
+
From 0cb750da86eb7f78d2632c3a9d70f74549fa36a9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 8 Nov 2023 17:29:45 -0800
Subject: [PATCH 109/128] [release/6.0] (deps): Bump src/submodules/googletest
(#51800)
Bumps [src/submodules/googletest](https://github.com/google/googletest) from `e47544a` to `b10fad3`.
- [Release notes](https://github.com/google/googletest/releases)
- [Commits](https://github.com/google/googletest/compare/e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b...b10fad38c4026a29ea6561ab15fc4818170d1c10)
---
updated-dependencies:
- dependency-name: src/submodules/googletest
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/submodules/googletest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/submodules/googletest b/src/submodules/googletest
index e47544ad31cb..b10fad38c402 160000
--- a/src/submodules/googletest
+++ b/src/submodules/googletest
@@ -1 +1 @@
-Subproject commit e47544ad31cb3ceecd04cc13e8fe556f8df9fe0b
+Subproject commit b10fad38c4026a29ea6561ab15fc4818170d1c10
From 5af738e9fa3e9ef7aacaa7571199f90666767192 Mon Sep 17 00:00:00 2001
From: wtgodbe
Date: Tue, 14 Nov 2023 12:52:56 -0800
Subject: [PATCH 110/128] Update baseline, SDK
---
eng/Baseline.Designer.props | 452 ++++++++++++++++++------------------
eng/Baseline.xml | 214 ++++++++---------
eng/Versions.props | 2 +-
global.json | 4 +-
4 files changed, 336 insertions(+), 336 deletions(-)
diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props
index 0ca47e957b58..cf3e083029dc 100644
--- a/eng/Baseline.Designer.props
+++ b/eng/Baseline.Designer.props
@@ -2,28 +2,28 @@
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
-
-
+
+
+
@@ -34,120 +34,120 @@
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
-
+
+
- 6.0.23
+ 6.0.25
-
-
+
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
@@ -155,114 +155,114 @@
- 6.0.23
+ 6.0.25
-
+
-
+
-
+
- 6.0.23
+ 6.0.25
-
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
+
- 6.0.23
+ 6.0.25
-
-
+
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
-
+
+
- 6.0.23
+ 6.0.25
-
+
- 6.0.23
+ 6.0.25
-
-
-
+
+
+
- 6.0.23
+ 6.0.25
-
-
+
+
- 6.0.23
+ 6.0.25
-
-
+
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
-
+
+
@@ -270,7 +270,7 @@
- 6.0.23
+ 6.0.25
@@ -278,50 +278,50 @@
- 6.0.23
+ 6.0.25
-
+
-
+
-
+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23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
@@ -769,7 +769,7 @@
- 6.0.23
+ 6.0.25
@@ -788,7 +788,7 @@
- 6.0.23
+ 6.0.25
@@ -804,46 +804,46 @@
- 6.0.23
+ 6.0.25
-
+
-
+
-
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
-
-
+
+
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
@@ -853,7 +853,7 @@
- 6.0.23
+ 6.0.25
@@ -862,73 +862,73 @@
- 6.0.23
+ 6.0.25
-
+
-
+
-
+
- 6.0.23
+ 6.0.25
-
+
-
+
-
+
- 6.0.23
+ 6.0.25
-
+
-
+
-
+
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
@@ -957,11 +957,11 @@
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
@@ -979,13 +979,13 @@
- 6.0.23
+ 6.0.25
- 6.0.23
+ 6.0.25
-
+
\ No newline at end of file
diff --git a/eng/Baseline.xml b/eng/Baseline.xml
index 749cc484d04a..9bd93a3db1af 100644
--- a/eng/Baseline.xml
+++ b/eng/Baseline.xml
@@ -4,111 +4,111 @@ This file contains a list of all the packages and their versions which were rele
Update this list when preparing for a new patch.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eng/Versions.props b/eng/Versions.props
index ce912efb6bed..529ac6f4cff3 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -9,7 +9,7 @@
6
0
26
- false
+ true
diff --git a/global.json b/global.json
index 2b186f5181df..3e59677b4a00 100644
--- a/global.json
+++ b/global.json
@@ -1,9 +1,9 @@
{
"sdk": {
- "version": "6.0.123"
+ "version": "6.0.125"
},
"tools": {
- "dotnet": "6.0.123",
+ "dotnet": "6.0.125",
"runtimes": {
"dotnet/x64": [
"2.1.30",
From 6eb06cce37be67059bbf3e5c7ee6cb54829c3522 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 15 Nov 2023 01:48:43 +0000
Subject: [PATCH 111/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-efcore
---
NuGet.config | 8 ++++++--
eng/Version.Details.xml | 32 ++++++++++++++++----------------
eng/Versions.props | 16 ++++++++--------
3 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 080af6f8c196..457083d2fdfe 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -5,9 +5,11 @@
+
+
-
+
@@ -25,9 +27,11 @@
-
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 50a71707b430..a3de7611b28a 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,37 +9,37 @@
-->
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- ebac2284d2825218fa91c188a3f428f244aa6fe3
+ 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
https://github.com/dotnet/runtime
diff --git a/eng/Versions.props b/eng/Versions.props
index 529ac6f4cff3..dc13d4782a45 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -122,14 +122,14 @@
6.0.11
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26
6.0.0-beta.23511.8
6.0.0-beta.23511.8
From d27f52b0aa462b713f1e3eb1d5a072fc87a5d45e Mon Sep 17 00:00:00 2001
From: "dotnet-maestro[bot]"
<42748379+dotnet-maestro[bot]@users.noreply.github.com>
Date: Mon, 20 Nov 2023 21:09:29 +0000
Subject: [PATCH 112/128] Update dependencies from
https://github.com/dotnet/arcade build 20231017.3 (#52226)
[release/6.0] Update dependencies from dotnet/arcade
---
NuGet.config | 4 ----
eng/Version.Details.xml | 16 ++++++++--------
eng/Versions.props | 4 ++--
global.json | 4 ++--
4 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 080af6f8c196..1e2458c409ad 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,8 @@
-
-
@@ -25,10 +23,8 @@
-
-
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 50a71707b430..b7759757683c 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -280,22 +280,22 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
0545d9fd7d80e0e8eaaff87aa0011ad5bc13fcc8
-
+
https://github.com/dotnet/arcade
- 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
+ 7c67805da0adbf4e72f2f4799b63efcf1cc8fe4c
-
+
https://github.com/dotnet/arcade
- 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
+ 7c67805da0adbf4e72f2f4799b63efcf1cc8fe4c
-
+
https://github.com/dotnet/arcade
- 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
+ 7c67805da0adbf4e72f2f4799b63efcf1cc8fe4c
-
+
https://github.com/dotnet/arcade
- 06ccd9430e2e3bd29a381a5b27e7976d11b0ed18
+ 7c67805da0adbf4e72f2f4799b63efcf1cc8fe4c
diff --git a/eng/Versions.props b/eng/Versions.props
index 529ac6f4cff3..048f9e1a1662 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -131,8 +131,8 @@
6.0.25
6.0.25
- 6.0.0-beta.23511.8
- 6.0.0-beta.23511.8
+ 6.0.0-beta.23517.3
+ 6.0.0-beta.23517.3
-
-
-
+
@@ -30,9 +28,7 @@
-
-
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index a3de7611b28a..cd4191b54be6 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
+ f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -245,33 +245,33 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
+ f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
+ f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
+ f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
+ f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
+ f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 492abbeef0d8a6ea902ac8f90ed339c7b1d18bf4
+ f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
diff --git a/eng/Versions.props b/eng/Versions.props
index dc13d4782a45..c611687c53d5 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -63,12 +63,12 @@
6.0.0
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25
- 6.0.25-servicing.23519.12
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26
+ 6.0.26-servicing.23565.9
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.25-servicing.23519.12
+ 6.0.26-servicing.23565.9
6.0.1
6.0.0
6.0.2
From 8ebb7f05aff6fbbc5a3b6c7c4b319d725a640936 Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Mon, 20 Nov 2023 21:28:47 +0000
Subject: [PATCH 114/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore build 20231120.13
dotnet-ef , Microsoft.EntityFrameworkCore , Microsoft.EntityFrameworkCore.Design , Microsoft.EntityFrameworkCore.InMemory , Microsoft.EntityFrameworkCore.Relational , Microsoft.EntityFrameworkCore.Sqlite , Microsoft.EntityFrameworkCore.SqlServer , Microsoft.EntityFrameworkCore.Tools
From Version 6.0.26 -> To Version 6.0.26
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 85d9fe7d440f..701cc4197b3a 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -7,7 +7,7 @@
-
+
@@ -25,7 +25,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index cd4191b54be6..ec524ded3999 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -11,35 +11,35 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://dev.azure.com/dnceng/internal/_git/dotnet-efcore
- 6eb9da7723d4b08287ca8d60c75317c08a2dd89b
+ b254074a09b0021d472383ea15b3bb703eae3ee3
https://github.com/dotnet/runtime
From 8d93d21aec94232ecba81e9752720985c8971bc0 Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Mon, 20 Nov 2023 22:55:55 +0000
Subject: [PATCH 115/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20231120.14
Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport
From Version 6.0.26-servicing.23565.9 -> To Version 6.0.26-servicing.23570.14
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 701cc4197b3a..7e57bf4da4c0 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index ec524ded3999..df11cee3df3b 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
+ 88c49c921704ba9cc603f167fc09fa2a79cebb63
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
+ 88c49c921704ba9cc603f167fc09fa2a79cebb63
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
+ 88c49c921704ba9cc603f167fc09fa2a79cebb63
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
+ 88c49c921704ba9cc603f167fc09fa2a79cebb63
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
+ 88c49c921704ba9cc603f167fc09fa2a79cebb63
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
+ 88c49c921704ba9cc603f167fc09fa2a79cebb63
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- f1697b9e74e8832a2bd9ce8e48b27c9546e02adf
+ 88c49c921704ba9cc603f167fc09fa2a79cebb63
diff --git a/eng/Versions.props b/eng/Versions.props
index c611687c53d5..a86b091815b1 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.26
6.0.26
6.0.26
- 6.0.26-servicing.23565.9
+ 6.0.26-servicing.23570.14
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.26-servicing.23565.9
+ 6.0.26-servicing.23570.14
6.0.1
6.0.0
6.0.2
From 1136a4b0aa533cd22ec670e0e3270f58eb391e69 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Wed, 22 Nov 2023 16:11:51 +0000
Subject: [PATCH 116/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 7e57bf4da4c0..82789d011a2a 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index df11cee3df3b..aaaa2ab8371a 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 88c49c921704ba9cc603f167fc09fa2a79cebb63
+ 40bd47545ee42f9ca95d738351eb675edfea3858
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 88c49c921704ba9cc603f167fc09fa2a79cebb63
+ 40bd47545ee42f9ca95d738351eb675edfea3858
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 88c49c921704ba9cc603f167fc09fa2a79cebb63
+ 40bd47545ee42f9ca95d738351eb675edfea3858
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 88c49c921704ba9cc603f167fc09fa2a79cebb63
+ 40bd47545ee42f9ca95d738351eb675edfea3858
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 88c49c921704ba9cc603f167fc09fa2a79cebb63
+ 40bd47545ee42f9ca95d738351eb675edfea3858
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 88c49c921704ba9cc603f167fc09fa2a79cebb63
+ 40bd47545ee42f9ca95d738351eb675edfea3858
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 88c49c921704ba9cc603f167fc09fa2a79cebb63
+ 40bd47545ee42f9ca95d738351eb675edfea3858
diff --git a/eng/Versions.props b/eng/Versions.props
index a86b091815b1..03c8c71e9a77 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.26
6.0.26
6.0.26
- 6.0.26-servicing.23570.14
+ 6.0.26-servicing.23571.26
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.26-servicing.23570.14
+ 6.0.26-servicing.23571.26
6.0.1
6.0.0
6.0.2
From ddae5e05877241ab82bbe8c162a6c778327a7e10 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Thu, 23 Nov 2023 03:59:11 +0000
Subject: [PATCH 117/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 82789d011a2a..f817759b37c9 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index aaaa2ab8371a..073f0a3e23eb 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 40bd47545ee42f9ca95d738351eb675edfea3858
+ 821d21b8891ee470a36b2f7fb51e952ff0833c7c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 40bd47545ee42f9ca95d738351eb675edfea3858
+ 821d21b8891ee470a36b2f7fb51e952ff0833c7c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 40bd47545ee42f9ca95d738351eb675edfea3858
+ 821d21b8891ee470a36b2f7fb51e952ff0833c7c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 40bd47545ee42f9ca95d738351eb675edfea3858
+ 821d21b8891ee470a36b2f7fb51e952ff0833c7c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 40bd47545ee42f9ca95d738351eb675edfea3858
+ 821d21b8891ee470a36b2f7fb51e952ff0833c7c
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 40bd47545ee42f9ca95d738351eb675edfea3858
+ 821d21b8891ee470a36b2f7fb51e952ff0833c7c
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 40bd47545ee42f9ca95d738351eb675edfea3858
+ 821d21b8891ee470a36b2f7fb51e952ff0833c7c
diff --git a/eng/Versions.props b/eng/Versions.props
index 03c8c71e9a77..43d1045ac832 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.26
6.0.26
6.0.26
- 6.0.26-servicing.23571.26
+ 6.0.26-servicing.23572.13
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.26-servicing.23571.26
+ 6.0.26-servicing.23572.13
6.0.1
6.0.0
6.0.2
From b42ee9d653b5d95bd2561a95e19db90dd3ed29f1 Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Thu, 23 Nov 2023 08:25:45 +0000
Subject: [PATCH 118/128] [internal/release/6.0] Update dependencies from
dnceng/internal/dotnet-runtime
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index f817759b37c9..05d854300154 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 073f0a3e23eb..05740c20d9ce 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 821d21b8891ee470a36b2f7fb51e952ff0833c7c
+ 28b24e5d69b243e93dcb927ffa2013511ea03d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 821d21b8891ee470a36b2f7fb51e952ff0833c7c
+ 28b24e5d69b243e93dcb927ffa2013511ea03d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 821d21b8891ee470a36b2f7fb51e952ff0833c7c
+ 28b24e5d69b243e93dcb927ffa2013511ea03d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 821d21b8891ee470a36b2f7fb51e952ff0833c7c
+ 28b24e5d69b243e93dcb927ffa2013511ea03d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 821d21b8891ee470a36b2f7fb51e952ff0833c7c
+ 28b24e5d69b243e93dcb927ffa2013511ea03d8f
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 821d21b8891ee470a36b2f7fb51e952ff0833c7c
+ 28b24e5d69b243e93dcb927ffa2013511ea03d8f
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 821d21b8891ee470a36b2f7fb51e952ff0833c7c
+ 28b24e5d69b243e93dcb927ffa2013511ea03d8f
diff --git a/eng/Versions.props b/eng/Versions.props
index 43d1045ac832..d60e4df18e5e 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.26
6.0.26
6.0.26
- 6.0.26-servicing.23572.13
+ 6.0.26-servicing.23572.23
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.26-servicing.23572.13
+ 6.0.26-servicing.23572.23
6.0.1
6.0.0
6.0.2
From 23e348cd9a35f42892e2eb22d90cf656d1f3c92c Mon Sep 17 00:00:00 2001
From: DotNet-Bot
Date: Thu, 23 Nov 2023 10:04:32 +0000
Subject: [PATCH 119/128] Update dependencies from
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime build 20231122.29
Microsoft.Internal.Runtime.AspNetCore.Transport , Microsoft.NET.Runtime.MonoAOTCompiler.Task , Microsoft.NET.Runtime.WebAssembly.Sdk , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.BrowserDebugHost.Transport
From Version 6.0.26-servicing.23572.23 -> To Version 6.0.26-servicing.23572.29
---
NuGet.config | 4 ++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index 05d854300154..c89ea15d458b 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,7 +4,7 @@
-
+
@@ -28,7 +28,7 @@
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 05740c20d9ce..fb1c0eed695a 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 28b24e5d69b243e93dcb927ffa2013511ea03d8f
+ 965a793efc765ddbea3c43e43c13b8e956b61946
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 28b24e5d69b243e93dcb927ffa2013511ea03d8f
+ 965a793efc765ddbea3c43e43c13b8e956b61946
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 28b24e5d69b243e93dcb927ffa2013511ea03d8f
+ 965a793efc765ddbea3c43e43c13b8e956b61946
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 28b24e5d69b243e93dcb927ffa2013511ea03d8f
+ 965a793efc765ddbea3c43e43c13b8e956b61946
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 28b24e5d69b243e93dcb927ffa2013511ea03d8f
+ 965a793efc765ddbea3c43e43c13b8e956b61946
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 28b24e5d69b243e93dcb927ffa2013511ea03d8f
+ 965a793efc765ddbea3c43e43c13b8e956b61946
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 28b24e5d69b243e93dcb927ffa2013511ea03d8f
+ 965a793efc765ddbea3c43e43c13b8e956b61946
diff --git a/eng/Versions.props b/eng/Versions.props
index d60e4df18e5e..64b68ed34897 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.26
6.0.26
6.0.26
- 6.0.26-servicing.23572.23
+ 6.0.26-servicing.23572.29
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.26-servicing.23572.23
+ 6.0.26-servicing.23572.29
6.0.1
6.0.0
6.0.2
From 00f7c0edf759ec4fa22094a1571b1b1530ffe183 Mon Sep 17 00:00:00 2001
From: Matt Mitchell
Date: Mon, 27 Nov 2023 18:55:36 +0000
Subject: [PATCH 120/128] Merged PR 35424: Update IdentityModel to 6.34.0
---
eng/Versions.props | 8 ++++----
.../clients/csharp/Client/test/FunctionalTests/Startup.cs | 3 ++-
src/SignalR/clients/ts/FunctionalTests/Startup.cs | 3 ++-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 64b68ed34897..c8b6d352257a 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -196,16 +196,16 @@
3.3.0
1.1.1-beta1.21413.1
1.0.0-20200708.1
- 6.10.0
- 6.10.0
- 6.10.0
+ 6.34.0
+ 6.34.0
+ 6.34.0
2.2.1
1.0.1
3.0.1
3.0.1
11.1.0
1.4.0
- 6.10.0
+ 6.34.0
6.0.5
6.0.5
6.0.5
diff --git a/src/SignalR/clients/csharp/Client/test/FunctionalTests/Startup.cs b/src/SignalR/clients/csharp/Client/test/FunctionalTests/Startup.cs
index edba459c3d2c..c92789e99dce 100644
--- a/src/SignalR/clients/csharp/Client/test/FunctionalTests/Startup.cs
+++ b/src/SignalR/clients/csharp/Client/test/FunctionalTests/Startup.cs
@@ -5,6 +5,7 @@
using System.IdentityModel.Tokens.Jwt;
using System.IO;
using System.Security.Claims;
+using System.Security.Cryptography;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
@@ -20,7 +21,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
{
public class Startup
{
- private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(Guid.NewGuid().ToByteArray());
+ private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
public void ConfigureServices(IServiceCollection services)
diff --git a/src/SignalR/clients/ts/FunctionalTests/Startup.cs b/src/SignalR/clients/ts/FunctionalTests/Startup.cs
index a794858d63c6..f40d5de008ca 100644
--- a/src/SignalR/clients/ts/FunctionalTests/Startup.cs
+++ b/src/SignalR/clients/ts/FunctionalTests/Startup.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Reflection;
using System.Security.Claims;
+using System.Security.Cryptography;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.JwtBearer;
@@ -30,7 +31,7 @@ namespace FunctionalTests
{
public class Startup
{
- private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(Guid.NewGuid().ToByteArray());
+ private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
private int _numRedirects;
From 1450caeedbbcbc4019a79b328b98ceb344ee6593 Mon Sep 17 00:00:00 2001
From: Javier Calvarro Nelson
Date: Mon, 27 Nov 2023 22:47:41 +0100
Subject: [PATCH 121/128] [Blazor] Update MSBuild targets so they get imported
correctly (6.0). (#52260)
## Issue: Microsoft.AspNetCore.Components.WebView.props is not imported by Maui applications
This issue pertains to the non-importation of Microsoft.AspNetCore.Components.WebView.props by Maui applications. The file has been relocated within the package to ensure its correct pickup and importation during the restore/build process.
Fixes #42348.
## Description
The inability of Maui applications to rely on JavaScript (JS) initializers, particularly in the case of Fluent UI, is impacted by this issue. The runtime searches for the initializer's definition in a specific location, which is configured in the props file of the package.
## Impact on Customers
The malfunction of JS initializers in Blazor Hybrid has significant implications for both library authors and end users.
Library authors may find their libraries' functionality restricted due to this bug. JS initializers, a feature in Blazor, enable library authors to inject scripts onto the page at the start of the app. These scripts can augment functionality, enhance user interfaces, or facilitate third-party service integration. For instance, a library author might employ a JS initializer to inject a script that integrates with a mapping service, thereby providing real-time location updates within a Blazor app. This functionality would be unavailable in Blazor Hybrid apps due to this bug.
End users may be unable to use certain libraries, or those libraries may not function as anticipated in Blazor Hybrid apps. If a user were to use a Blazor Hybrid app that relies on the aforementioned mapping library, they would not receive the real-time location updates that they would in a regular Blazor app. This could result in an inferior user experience, and in some cases, render the app unusable.
Users and library authors are compelled to manually inject the script onto the page, and some functionality (like configuring Blazor before it starts) is not available in this mode.
## Regression?
- [ ] Yes
- [X] No
## Risk
- [ ] High
- [ ] Medium
- [X] Low
The failure to load a file from a NuGet package impacts the build. The change causes the file to load at build time, enabling the rest of the pipeline to function as expected.
## Verification
- [X] Manual (required)
- [ ] Automated
The changes were made locally on the package cache and ensured the file got imported.
## Packaging changes reviewed?
- [ ] Yes
- [ ] No
- [x] N/A
## When servicing release/2.1
- [ ] Make necessary changes in eng/PatchConfig.props
---
.../testassets/PhotinoTestApp/PhotinoTestApp.csproj | 2 +-
.../WebView/src/Microsoft.AspNetCore.Components.WebView.csproj | 2 +-
.../Microsoft.AspNetCore.Components.WebView.props | 0
.../Microsoft.AspNetCore.Components.WebView.props | 3 +++
.../Microsoft.AspNetCore.Components.WebView.props | 3 +++
5 files changed, 8 insertions(+), 2 deletions(-)
rename src/Components/WebView/WebView/src/{buildTransitive/any => build}/Microsoft.AspNetCore.Components.WebView.props (100%)
create mode 100644 src/Components/WebView/WebView/src/buildMultiTargeting/Microsoft.AspNetCore.Components.WebView.props
create mode 100644 src/Components/WebView/WebView/src/buildTransitive/Microsoft.AspNetCore.Components.WebView.props
diff --git a/src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/PhotinoTestApp.csproj b/src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/PhotinoTestApp.csproj
index 2e581d2a73f9..009fa65b06dc 100644
--- a/src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/PhotinoTestApp.csproj
+++ b/src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/PhotinoTestApp.csproj
@@ -7,7 +7,7 @@
false
-
+
diff --git a/src/Components/WebView/WebView/src/Microsoft.AspNetCore.Components.WebView.csproj b/src/Components/WebView/WebView/src/Microsoft.AspNetCore.Components.WebView.csproj
index 89f647db6b44..27133a706acb 100644
--- a/src/Components/WebView/WebView/src/Microsoft.AspNetCore.Components.WebView.csproj
+++ b/src/Components/WebView/WebView/src/Microsoft.AspNetCore.Components.WebView.csproj
@@ -33,7 +33,7 @@
-
+
diff --git a/src/Components/WebView/WebView/src/buildTransitive/any/Microsoft.AspNetCore.Components.WebView.props b/src/Components/WebView/WebView/src/build/Microsoft.AspNetCore.Components.WebView.props
similarity index 100%
rename from src/Components/WebView/WebView/src/buildTransitive/any/Microsoft.AspNetCore.Components.WebView.props
rename to src/Components/WebView/WebView/src/build/Microsoft.AspNetCore.Components.WebView.props
diff --git a/src/Components/WebView/WebView/src/buildMultiTargeting/Microsoft.AspNetCore.Components.WebView.props b/src/Components/WebView/WebView/src/buildMultiTargeting/Microsoft.AspNetCore.Components.WebView.props
new file mode 100644
index 000000000000..1a28c40b8013
--- /dev/null
+++ b/src/Components/WebView/WebView/src/buildMultiTargeting/Microsoft.AspNetCore.Components.WebView.props
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/Components/WebView/WebView/src/buildTransitive/Microsoft.AspNetCore.Components.WebView.props b/src/Components/WebView/WebView/src/buildTransitive/Microsoft.AspNetCore.Components.WebView.props
new file mode 100644
index 000000000000..1a28c40b8013
--- /dev/null
+++ b/src/Components/WebView/WebView/src/buildTransitive/Microsoft.AspNetCore.Components.WebView.props
@@ -0,0 +1,3 @@
+
+
+
From 06bce6c59fc2bd3f7a5831d017105ed17370b302 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Mon, 27 Nov 2023 14:34:59 -0800
Subject: [PATCH 122/128] Include oauth package for openid connect.
refs JIT-95035
---
pack-list.txt | 1 +
pack.sh.txt | 3 ++-
.../OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/pack-list.txt b/pack-list.txt
index d43b5876311f..6e02de90e9b7 100644
--- a/pack-list.txt
+++ b/pack-list.txt
@@ -2,6 +2,7 @@ Microsoft.AspNetCore.Antiforgery.csproj
Microsoft.AspNetCore.Authentication.Abstractions.csproj
Microsoft.AspNetCore.Authentication.Cookies.csproj
Microsoft.AspNetCore.Authentication.Core.csproj
+Microsoft.AspNetCore.Authentication.OAuth.csproj
Microsoft.AspNetCore.Authentication.csproj
Microsoft.AspNetCore.Authorization.csproj
Microsoft.AspNetCore.Authorization.Policy.csproj
diff --git a/pack.sh.txt b/pack.sh.txt
index 014ae85a6294..491cf40dd8d8 100644
--- a/pack.sh.txt
+++ b/pack.sh.txt
@@ -1,6 +1,6 @@
#! /bin/zsh
-set -e
+set -e
(cd src/Servers/Kestrel && dotnet pack ./Kestrel.slnf)
@@ -8,6 +8,7 @@ dotnet pack **/Microsoft.AspNetCore.Authentication.csproj
dotnet pack **/Microsoft.AspNetCore.Authentication.Abstractions.csproj
dotnet pack **/Microsoft.AspNetCore.Authentication.Cookies.csproj
dotnet pack **/Microsoft.AspNetCore.Authentication.Core.csproj
+dotnet pack **/Microsoft.AspNetCore.Authentication.OAuth.csproj
dotnet pack **/Microsoft.AspNetCore.Authorization.csproj
dotnet pack **/Microsoft.AspNetCore.CookiePolicy.csproj
dotnet pack **/Microsoft.AspNetCore.Connections.Abstractions.csproj
diff --git a/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj b/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj
index c3e2e400e43c..cb55cec03974 100644
--- a/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj
+++ b/src/Security/Authentication/OAuth/src/Microsoft.AspNetCore.Authentication.OAuth.csproj
@@ -6,7 +6,7 @@
true
true
aspnetcore;authentication;security
- false
+ true
enable
From cceda4a3e53484485b11076d8687506117f8a15e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 1 Dec 2023 09:39:46 -0600
Subject: [PATCH 123/128] [release/6.0] (deps): Bump src/submodules/googletest
(#52510)
Bumps [src/submodules/googletest](https://github.com/google/googletest) from `b10fad3` to `76bb2af`.
- [Release notes](https://github.com/google/googletest/releases)
- [Commits](https://github.com/google/googletest/compare/b10fad38c4026a29ea6561ab15fc4818170d1c10...76bb2afb8b522d24496ad1c757a49784fbfa2e42)
---
updated-dependencies:
- dependency-name: src/submodules/googletest
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/submodules/googletest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/submodules/googletest b/src/submodules/googletest
index b10fad38c402..76bb2afb8b52 160000
--- a/src/submodules/googletest
+++ b/src/submodules/googletest
@@ -1 +1 @@
-Subproject commit b10fad38c4026a29ea6561ab15fc4818170d1c10
+Subproject commit 76bb2afb8b522d24496ad1c757a49784fbfa2e42
From 3fcbb4e1ccc6d063f7fce7c9977698b809111758 Mon Sep 17 00:00:00 2001
From: Matt Mitchell
Date: Fri, 1 Dec 2023 17:42:54 +0000
Subject: [PATCH 124/128] Merged PR 35732: Updated to 6.35.0
Update to 6.35.0
---
eng/Versions.props | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/eng/Versions.props b/eng/Versions.props
index 90ba717447ab..ac245a4cfbba 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -196,16 +196,16 @@
3.3.0
1.1.1-beta1.21413.1
1.0.0-20200708.1
- 6.34.0
- 6.34.0
- 6.34.0
+ 6.35.0
+ 6.35.0
+ 6.35.0
2.2.1
1.0.1
3.0.1
3.0.1
11.1.0
1.4.0
- 6.34.0
+ 6.35.0
6.0.5
6.0.5
6.0.5
From 0a1f30991fd00e30ecdf6982b1ffbc1888acd4cc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 1 Dec 2023 13:20:10 -0600
Subject: [PATCH 125/128] [release/6.0] (deps): Bump
src/submodules/spa-templates (#52509)
Bumps [src/submodules/spa-templates](https://github.com/dotnet/spa-templates) from `99a804e` to `0e12deb`.
- [Commits](https://github.com/dotnet/spa-templates/compare/99a804ec5b0984e7f12f9f7b3975ff9839ff8813...0e12deb491e59f72b47ff655f8274b17508174fc)
---
updated-dependencies:
- dependency-name: src/submodules/spa-templates
dependency-type: direct:production
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
src/submodules/spa-templates | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/submodules/spa-templates b/src/submodules/spa-templates
index 99a804ec5b09..0e12deb491e5 160000
--- a/src/submodules/spa-templates
+++ b/src/submodules/spa-templates
@@ -1 +1 @@
-Subproject commit 99a804ec5b0984e7f12f9f7b3975ff9839ff8813
+Subproject commit 0e12deb491e59f72b47ff655f8274b17508174fc
From d504a7b7dab277712646747e9f5cce0d9507245e Mon Sep 17 00:00:00 2001
From: DotNet Bot
Date: Tue, 5 Dec 2023 21:38:48 +0000
Subject: [PATCH 126/128] Merged PR 35825: [internal/release/6.0] Update
dependencies from dnceng/internal/dotnet-runtime
This pull request updates the following dependencies
[marker]: <> (Begin:7745f62d-e15b-4ba3-39b3-08d960f4ca81)
## From https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- **Subscription**: 7745f62d-e15b-4ba3-39b3-08d960f4ca81
- **Build**: 20231205.8
- **Date Produced**: December 5, 2023 9:01:32 PM UTC
- **Commit**: dc45e96840243b203b13e61952230e225d2aac52
- **Branch**: refs/heads/internal/release/6.0
[DependencyUpdate]: <> (Begin)
- **Updates**:
- **Microsoft.Internal.Runtime.AspNetCore.Transport**: [from 6.0.26-servicing.23572.29 to 6.0.26-servicing.23605.8][1]
- **Microsoft.NET.Runtime.MonoAOTCompiler.Task**: [from 6.0.26 to 6.0.26][1]
- **Microsoft.NET.Runtime.WebAssembly.Sdk**: [from 6.0.26 to 6.0.26][1]
- **Microsoft.NETCore.App.Ref**: [from 6.0.26 to 6.0.26][1]
- **Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm**: [from 6.0.26 to 6.0.26][1]
- **Microsoft.NETCore.App.Runtime.win-x64**: [from 6.0.26 to 6.0.26][1]
- **Microsoft.NETCore.BrowserDebugHost.Transport**: [from 6.0.26-servicing.23572.29 to 6.0.26-servicing.23605.8][1]
[1]: https://dev.azure.com/dnceng/internal/_git/dotnet-runtime/branches?baseVersion=GC965a793efc&targetVersion=GCdc45e96840&_a=files
[DependencyUpdate]: <> (End)
[marker]: <> (End:7745f62d-e15b-4ba3-39b3-08d960f4ca81)
---
NuGet.config | 6 ++++--
eng/Version.Details.xml | 18 +++++++++---------
eng/Versions.props | 4 ++--
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/NuGet.config b/NuGet.config
index c89ea15d458b..d7bce1f454a5 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -4,10 +4,11 @@
-
+
+
@@ -25,10 +26,11 @@
+
-
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 84d28f989c4d..b4ff11e93636 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -177,9 +177,9 @@
https://github.com/dotnet/runtime
4822e3c3aa77eb82b2fb33c9321f923cf11ddde6
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 965a793efc765ddbea3c43e43c13b8e956b61946
+ dc45e96840243b203b13e61952230e225d2aac52
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
@@ -247,15 +247,15 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 965a793efc765ddbea3c43e43c13b8e956b61946
+ dc45e96840243b203b13e61952230e225d2aac52
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 965a793efc765ddbea3c43e43c13b8e956b61946
+ dc45e96840243b203b13e61952230e225d2aac52
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 965a793efc765ddbea3c43e43c13b8e956b61946
+ dc45e96840243b203b13e61952230e225d2aac52
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 965a793efc765ddbea3c43e43c13b8e956b61946
+ dc45e96840243b203b13e61952230e225d2aac52
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 965a793efc765ddbea3c43e43c13b8e956b61946
+ dc45e96840243b203b13e61952230e225d2aac52
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
- 965a793efc765ddbea3c43e43c13b8e956b61946
+ dc45e96840243b203b13e61952230e225d2aac52
diff --git a/eng/Versions.props b/eng/Versions.props
index ac245a4cfbba..cf1677e177db 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -68,7 +68,7 @@
6.0.26
6.0.26
6.0.26
- 6.0.26-servicing.23572.29
+ 6.0.26-servicing.23605.8
6.0.0
6.0.1
6.0.0
@@ -103,7 +103,7 @@
6.0.0
6.0.0
6.0.0
- 6.0.26-servicing.23572.29
+ 6.0.26-servicing.23605.8
6.0.1
6.0.0
6.0.2
From 5a6e1c19a10c55cb1b79aac5d7c294ba10c93ba7 Mon Sep 17 00:00:00 2001
From: Preston Jennings
Date: Tue, 6 Feb 2024 10:02:59 -0800
Subject: [PATCH 127/128] Add instructions for updating the fork.
refs JIT-97707
---
README-VINYL.md | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 README-VINYL.md
diff --git a/README-VINYL.md b/README-VINYL.md
new file mode 100644
index 000000000000..c48adac50bd7
--- /dev/null
+++ b/README-VINYL.md
@@ -0,0 +1,84 @@
+# AspNetCore for Vinyl offline mobile
+
+## Building Locally
+
+TODO:
+
+Ultimately I'm able to just do the following to build the project (from OSX):
+
+```
+./pack.ps1
+```
+
+There are probably a few setup steps to run beforehand :-)
+
+## Sync New Upstream Version.
+
+In order to sync up with a new version of AspNetCore, run the following commands:
+
+### Create git branch
+
+Merge tag 'v6.0.25' into feature/JIT-96177
+
+```
+git fetch upstream
+git fetch upstream --tags
+git merge v6.0.26
+```
+
+There is usually a merge conflict in `global.json` as we update the file with the version of .net 6.0 installed locally.
+
+Now commit and push to github.
+
+### Create build
+
+Navigate to the github actions for the vinyl-aspnetcore repo and run "Vinyl Maui Build".
+This will create the nuget packages for upload.
+
+## Uploading NuGet Packages to GitHub
+
+After creating the build, you'll need to push new nuget packages to the Jitterbit repository.
+This allows them to be pulled down by nuget when creating an offline mobile build.
+
+### Set up github authentication key
+
+If you haven't set up a github authentication key for writing packages to the jitterbit repository, do this now.
+
+- Navigate to your settings
+https://github.com/settings/profile
+- Click Developer Settings
+- Navigate to Personal Access Tokens > Tokens (classic)
+- Generate a new token and include `repo, write:packages` permissions.
+- Copy the generated key.
+- Open (or create) the file `~/.nuget/NuGet/NuGet.Config`
+- Add the following sections (merging with existing values if necessary)
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Date: Tue, 6 Feb 2024 15:22:40 -0800
Subject: [PATCH 128/128] Fix documentation.
refs JIT-97707
---
README-VINYL.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README-VINYL.md b/README-VINYL.md
index c48adac50bd7..eb3362bae92b 100644
--- a/README-VINYL.md
+++ b/README-VINYL.md
@@ -48,7 +48,7 @@ If you haven't set up a github authentication key for writing packages to the ji
https://github.com/settings/profile
- Click Developer Settings
- Navigate to Personal Access Tokens > Tokens (classic)
-- Generate a new token and include `repo, write:packages` permissions.
+- Generate a new token and include `repo, write:packages` permissions. Make sure to perform SSO for your new token!
- Copy the generated key.
- Open (or create) the file `~/.nuget/NuGet/NuGet.Config`
- Add the following sections (merging with existing values if necessary)
@@ -61,14 +61,14 @@ https://github.com/settings/profile
-
+
-
+