From 285afac49d512b2ce238e9b20044917274672290 Mon Sep 17 00:00:00 2001 From: Hariprasath S <113695067+Hariprasath4022@users.noreply.github.com> Date: Fri, 18 Sep 2026 12:32:49 +0530 Subject: [PATCH] Changes in DL validation --- src/main/resources/application.properties | 2 +- src/main/resources/templates/index.html | 14 +++++++++++++- src/main/resources/templates/index_tamil.html | 15 ++++++++++++++- src/main/resources/templates/webindex.html | 14 +++++++++++++- src/main/resources/templates/webindex_tamil.html | 15 ++++++++++++++- 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b589b60..96687da 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1 @@ - spring.profiles.active=dev \ No newline at end of file + spring.profiles.active=prod \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 71163ba..09dfe9d 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -1634,7 +1634,19 @@ isValid = false; } - } else { + } + else if (docs === "4") { + + if (!/^[a-zA-Z0-9]{16,18}$/.test(docNumber)) { + + $("#docNumberError").text( + documentName + " Number must contain 16 to 18 characters only (alphabets and numbers)" + ); + + isValid = false; + } + } + else { // Other documents = alphanumeric, max 10 characters if (!/^[a-zA-Z0-9]{10}$/.test(docNumber)) { diff --git a/src/main/resources/templates/index_tamil.html b/src/main/resources/templates/index_tamil.html index 5be6408..21afdba 100644 --- a/src/main/resources/templates/index_tamil.html +++ b/src/main/resources/templates/index_tamil.html @@ -1633,7 +1633,20 @@ function validateForm() { isValid = false; } - } else { + } + else if (docs === "4") { + + if (!/^[a-zA-Z0-9]{16,18}$/.test(docNumber)) { + + $("#docNumberError").text( + documentName + " எண்ணில் எழுத்துக்கள் மற்றும் எண்கள் மட்டுமே இருக்க வேண்டும் (16 - 18 எழுத்துக்கள்)" + ); + + isValid = false; + } + } + + else { // Other documents = alphanumeric, max 10 characters if (!/^[a-zA-Z0-9]{10}$/.test(docNumber)) { diff --git a/src/main/resources/templates/webindex.html b/src/main/resources/templates/webindex.html index fead74c..444bb6c 100644 --- a/src/main/resources/templates/webindex.html +++ b/src/main/resources/templates/webindex.html @@ -1657,8 +1657,20 @@ isValid = false; } - } else { + } + else if (docs === "4") { + if (!/^[a-zA-Z0-9]{16,18}$/.test(docNumber)) { + + $("#docNumberError").text( + documentName + " Number must contain 16 to 18 characters only (alphabets and numbers)" + ); + + isValid = false; + } + } + else { + // Other documents = alphanumeric, max 15 characters if (!/^[a-zA-Z0-9]{10}$/.test(docNumber)) { diff --git a/src/main/resources/templates/webindex_tamil.html b/src/main/resources/templates/webindex_tamil.html index 14b5ed4..ecb1a47 100644 --- a/src/main/resources/templates/webindex_tamil.html +++ b/src/main/resources/templates/webindex_tamil.html @@ -1639,7 +1639,20 @@ isValid = false; } - } else { + } + else if (docs === "4") { + + if (!/^[a-zA-Z0-9]{16,18}$/.test(docNumber)) { + + $("#docNumberError").text( + documentName + " எண்ணில் எழுத்துக்கள் மற்றும் எண்கள் மட்டுமே இருக்க வேண்டும் (16 - 18 எழுத்துக்கள்)" + ); + + isValid = false; + } + } + + else { // Other documents = alphanumeric, max 10 characters if (!/^[a-zA-Z0-9]{10}$/.test(docNumber)) {