Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[ljcom] r10264: LJSUP-8244: Need view error when user us...

Committer: pkornilov
LJSUP-8244: Need view error when user use incorrect Language
U   trunk/htdocs/js/pay.js
Modified: trunk/htdocs/js/pay.js
===================================================================
--- trunk/htdocs/js/pay.js	2011-03-18 08:41:41 UTC (rev 10263)
+++ trunk/htdocs/js/pay.js	2011-03-18 08:43:28 UTC (rev 10264)
@@ -447,7 +447,23 @@
 					}
 					input.data('is_focus', false);
 				});
-				
+			
+			function no_english_validate()
+			{
+				// keyboard no English
+				if (/[^a-z0-9!@#$%\^&*()_+\-=,.\/<>?;:'\\\[\] :"|]/i.test(this.value)) {
+					jQuery(this).closest('li')
+						.find('.b-bubble-lite').hide()
+						.end().find('.b-bubble-alert').show();
+				} else {
+					jQuery(this).closest('li')
+						.find('.b-bubble-lite').show()
+						.end().find('.b-bubble-alert').hide();
+				}
+			}
+			
+			jQuery([this.name_full, this.email]).input(no_english_validate).focus(no_english_validate);
+			
 			jQuery([this.cc_num, this.cc_cvv2]).input(function()
 			{
 				if (/[^0-9]/.test(this.value)) {

Tags: js, ljcom, lusever
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments