@@ -823,6 +823,28 @@ public function testValidateAlpha()
823823
824824 $ v = new Validator ($ trans , array ('x ' => 'http://google.com ' ), array ('x ' => 'Alpha ' ));
825825 $ this ->assertFalse ($ v ->passes ());
826+
827+ $ v = new Validator ($ trans , array ('x ' => 'ユニコードを基盤技術と ' ), array ('x ' => 'Alpha ' ));
828+ $ this ->assertTrue ($ v ->passes ());
829+
830+ $ v = new Validator ($ trans , array ('x ' => 'ユニコード を基盤技術と ' ), array ('x ' => 'Alpha ' ));
831+ $ this ->assertFalse ($ v ->passes ());
832+
833+ $ v = new Validator ($ trans , array ('x ' => 'नमस्कार ' ), array ('x ' => 'Alpha ' ));
834+ $ this ->assertTrue ($ v ->passes ());
835+
836+ $ v = new Validator ($ trans , array ('x ' => 'आपका स्वागत है ' ), array ('x ' => 'Alpha ' ));
837+ $ this ->assertFalse ($ v ->passes ());
838+
839+ $ v = new Validator ($ trans , array ('x ' => 'Continuación ' ), array ('x ' => 'Alpha ' ));
840+ $ this ->assertTrue ($ v ->passes ());
841+
842+ $ v = new Validator ($ trans , array ('x ' => 'ofreció su dimisión ' ), array ('x ' => 'Alpha ' ));
843+ $ this ->assertFalse ($ v ->passes ());
844+
845+ $ v = new Validator ($ trans , array ('x ' => '❤ ' ), array ('x ' => 'Alpha ' ));
846+ $ this ->assertFalse ($ v ->passes ());
847+
826848 }
827849
828850
@@ -834,6 +856,15 @@ public function testValidateAlphaNum()
834856
835857 $ v = new Validator ($ trans , array ('x ' => 'http://g232oogle.com ' ), array ('x ' => 'AlphaNum ' ));
836858 $ this ->assertFalse ($ v ->passes ());
859+
860+ $ v = new Validator ($ trans , array ('x ' => '१२३ ' ), array ('x ' => 'Alpha ' ));//numbers in Hindi
861+ $ this ->assertTrue ($ v ->passes ());
862+
863+ $ v = new Validator ($ trans , array ('x ' => '٧٨٩ ' ), array ('x ' => 'AlphaNum ' ));//eastern arabic numerals
864+ $ this ->assertTrue ($ v ->passes ());
865+
866+ $ v = new Validator ($ trans , array ('x ' => 'नमस्कार ' ), array ('x ' => 'Alpha ' ));
867+ $ this ->assertFalse ($ v ->passes ());
837868 }
838869
839870
@@ -845,6 +876,13 @@ public function testValidateAlphaDash()
845876
846877 $ v = new Validator ($ trans , array ('x ' => 'http://-g232oogle.com ' ), array ('x ' => 'AlphaDash ' ));
847878 $ this ->assertFalse ($ v ->passes ());
879+
880+ $ v = new Validator ($ trans , array ('x ' => 'नमस्कार-_ ' ), array ('x ' => 'Alpha ' ));
881+ $ this ->assertTrue ($ v ->passes ());
882+
883+ $ v = new Validator ($ trans , array ('x ' => '٧٨٩ ' ), array ('x ' => 'AlphaNum ' ));//eastern arabic numerals
884+ $ this ->assertFalse ($ v ->passes ());
885+
848886 }
849887
850888
0 commit comments