浏览代码

#1008: Add France postal code validator, thanks to @jazzzz

Phuoc Nguyen 11 年之前
父节点
当前提交
1fb3b369bb

+ 3 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@ __New Features__
 * [#844](https://github.com/nghuuphuoc/bootstrapvalidator/pull/844), [#874](https://github.com/nghuuphuoc/bootstrapvalidator/pull/874): The [stringLength](http://bootstrapvalidator.com/validators/stringLength/) validator adds option to evaluate length in UTF-8 bytes, thanks to [@thx2001r](https://github.com/thx2001r)
 * [#960](https://github.com/nghuuphuoc/bootstrapvalidator/issues/960): Add ```trim``` option for the [stringLength](http://bootstrapvalidator.com/validators/stringLength/) validator
 * [#1001](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1001): Add ```minFiles```, ```maxFiles```, ```minTotalSize```, ```maxTotalSize``` options for the [file](http://bootstrapvalidator.com/validators/file/) validator, thanks to [@morrizon](https://github.com/morrizon)
+* [#1008](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1008): Add France [postal code](http://bootstrapvalidator.com/validators/zipCode/) validator, thanks to [@jazzzz](https://github.com/jazzzz)
 
 __Improvements__
 * [#823](https://github.com/nghuuphuoc/bootstrapvalidator/issues/823): The [hexColor](http://bootstrapvalidator.com/validators/hexColor/) validator only accepts 6 hex character values when using HTML 5 ```type='color'``` attribute
@@ -27,6 +28,8 @@ __Document__
 * [#920](https://github.com/nghuuphuoc/bootstrapvalidator/issues/920), [#929](https://github.com/nghuuphuoc/bootstrapvalidator/pull/929), [#936](https://github.com/nghuuphuoc/bootstrapvalidator/pull/936): Update the [Changing the tooltip, popover's position](http://bootstrapvalidator.com/examples/tooltip-popover-position/) example, thanks to [@Arkni](https://github.com/Arkni)
 * [#938](https://github.com/nghuuphuoc/bootstrapvalidator/issues/938): Add [time](http://bootstrapvalidator.com/validators/regexp/#html-5-example) validator example
 * [#979](https://github.com/nghuuphuoc/bootstrapvalidator/issues/979): Add [Rails usage](http://bootstrapvalidator.com/validators/stringLength/#using-with-rails-form) for stringLength validator
+* [#1006](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1006): Fix the order of parameters for enableFieldValidators() method, thanks to [@mchrapka](https://github.com/mchrapka)
+* [#1009](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1009): Fixed mixed data/delay in remote doc, thanks to [@jazzzz](https://github.com/jazzzz)
 
 __Language Packages__
 * [#827](https://github.com/nghuuphuoc/bootstrapvalidator/pull/827): Update Dutch language package, thanks to [@JvanderHeide](https://github.com/JvanderHeide)

+ 1 - 0
CONTRIBUTORS.md

@@ -65,6 +65,7 @@ I would like to give big thanks to the following contributors:
 * [@MartinDevillers](https://github.com/MartinDevillers)
 * [@mattrick](https://github.com/mattrick)
 * [@mbezhanov](https://github.com/mbezhanov)
+* [@mchrapka](https://github.com/mchrapka)
 * [@mgibas](https://github.com/mgibas)
 * [@mike1e](https://github.com/mike1e)
 * [@morrizon](https://github.com/morrizon)

+ 1 - 0
src/js/language/ar_MA.js

@@ -347,6 +347,7 @@
                 CA: 'كندا',
                 CZ: 'التشيك',
                 DK: 'الدنمارك',
+                FR: 'فرنسا',
                 GB: 'المملكة المتحدة',
                 IT: 'إيطاليا',
                 MA: 'المغرب',

+ 1 - 0
src/js/language/be_FR.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Tchèque',
                 DK: 'Danemark',
+                FR: 'France',
                 GB: 'Royaume-Uni',
                 IT: 'Italie',
                 MA: 'Maroc',

+ 1 - 0
src/js/language/be_NL.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Tsjechische',
                 DK: 'Denemarken',
+                FR: 'Frankrijk',
                 GB: 'Verenigd Koninkrijk',
                 IT: 'Italië',
                 MA: 'Marokko',

+ 1 - 0
src/js/language/bg_BG.js

@@ -347,6 +347,7 @@
                 CA: 'Канада',
                 CZ: 'Чешката република',
                 DK: 'Дания',
+                FR: 'Франция',
                 GB: 'Обединеното кралство',
                 IT: 'Италия',
                 MA: 'Мароко',

+ 1 - 0
src/js/language/cs_CZ.js

@@ -347,6 +347,7 @@
                 CA: 'Kanada',
                 CZ: 'Českou Republiku',
                 DK: 'Dánsko',
+                FR: 'Francie',
                 GB: 'Velkou Británii',
                 IT: 'Itálie',
                 MA: 'Maroko',

+ 1 - 0
src/js/language/da_DK.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Tjekkiet',
                 DK: 'Danmark',
+                FR: 'Frankrig',
                 GB: 'Storbritannien',
                 IT: 'Italien',
                 MA: 'Marokko',

+ 1 - 0
src/js/language/de_DE.js

@@ -347,6 +347,7 @@
                 CA: 'Kanada',
                 CZ: 'Tschechische',
                 DK: 'Dänemark',
+                FR: 'Frankreich',
                 GB: 'Vereinigtes Königreich',
                 IT: 'Italien',
                 MA: 'Marokko',

+ 1 - 0
src/js/language/en_US.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Czech Republic',
                 DK: 'Denmark',
+                FR: 'France',
                 GB: 'United Kingdom',
                 IT: 'Italy',
                 MA: 'Morocco',

+ 1 - 0
src/js/language/es_CL.js

@@ -347,6 +347,7 @@
                 CA: 'Canadá',
                 CZ: 'República Checa',
                 DK: 'Dinamarca',
+                FR: 'Francia',
                 GB: 'Reino Unido',
                 IT: 'Italia',
                 MA: 'Marruecos',

+ 1 - 0
src/js/language/es_ES.js

@@ -347,6 +347,7 @@
                 CA: 'Canadá',
                 CZ: 'República Checa',
                 DK: 'Dinamarca',
+                FR: 'Francia',
                 GB: 'Reino Unido',
                 IT: 'Italia',
                 MA: 'Marruecos',

+ 1 - 0
src/js/language/fa_IR.js

@@ -347,6 +347,7 @@
                 CA: 'کانادا',
                 CZ: 'چک',
                 DK: 'دانمارک',
+                FR: 'فرانسه',
                 GB: 'بریتانیا',
                 IT: 'ایتالیا',
                 MA: 'مراکش',

+ 1 - 0
src/js/language/fr_FR.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'République Tchèque',
                 DK: 'Danemark',
+                FR: 'France',
                 GB: 'Royaume-Uni',
                 IT: 'Italie',
                 MA: 'Maroc',

+ 1 - 0
src/js/language/gr_EL.js

@@ -347,6 +347,7 @@
                 CA: 'Καναδάς',
                 CZ: 'Δημοκρατία της Τσεχίας',
                 DK: 'Δανία',
+                FR: 'Γαλλία',
                 GB: 'Ηνωμένο Βασίλειο',
                 IT: 'Ιταλία',
                 MA: 'Μαρόκο',

+ 1 - 0
src/js/language/he_IL.js

@@ -347,6 +347,7 @@
                 CA: 'קנדה',
                 CZ: 'צכיה',
                 DK: 'דנמרק',
+                FR: 'צרפת',
                 GB: 'בריטניה',
                 IT: 'איטליה',
                 MA: 'מרוקו',

+ 1 - 0
src/js/language/hu_HU.js

@@ -347,6 +347,7 @@
                 CA: 'Kanadában',
                 CZ: 'Csehországban',
                 DK: 'Dániában',
+                FR: 'Franciaországban',
                 GB: 'az Egyesült Királyságban',
                 IT: 'Olaszországban',
                 MA: 'Marokkóban',

+ 1 - 0
src/js/language/id_ID.js

@@ -347,6 +347,7 @@
                 CA: 'Kanada',
                 CZ: 'Czech',
                 DK: 'Denmark',
+                FR: 'Francis',
                 GB: 'Inggris',
                 IT: 'Italia',
                 MA: 'Maroko',

+ 1 - 0
src/js/language/it_IT.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Republica Ceca',
                 DK: 'Danimarca',
+                FR: 'Francia',
                 GB: 'Regno Unito',
                 IT: 'Italia',
                 MA: 'Marocco',

+ 1 - 0
src/js/language/ja_JP.js

@@ -347,6 +347,7 @@
                 CA: 'カナダ',
                 CZ: 'チェコ共和国',
                 DK: 'デンマーク',
+                FR: 'フランス',
                 GB: 'イギリス',
                 IT: 'イタリア',
                 MA: 'モロッコ',

+ 1 - 0
src/js/language/nl_NL.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Tsjechische Republiek',
                 DK: 'Denemarken',
+                FR: 'Frankrijk',
                 GB: 'Verenigd Koninkrijk',
                 IT: 'Italië',
                 MA: 'Marokko',

+ 1 - 0
src/js/language/no_NO.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Tsjekkia',
                 DK: 'Danmark',
+                FR: 'Frankrike',
                 GB: 'Storbritannia',
                 IT: 'Italia',
                 MA: 'Marokko',

+ 1 - 0
src/js/language/pl_PL.js

@@ -347,6 +347,7 @@
                 CA: 'Kanada',
                 CZ: 'Czechy',
                 DK: 'Dania',
+                FR: 'Francja',
                 GB: 'Wielka Brytania',
                 IT: 'Włochy',
                 MA: 'Maroko',

+ 1 - 0
src/js/language/pt_BR.js

@@ -347,6 +347,7 @@
                 CA: 'Canadá',
                 CZ: 'República Checa',
                 DK: 'Dinamarca',
+                FR: 'França',
                 GB: 'Reino Unido',
                 IT: 'Itália',
                 MA: 'Marrocos',

+ 1 - 0
src/js/language/ro_RO.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Republica Cehia',
                 DK: 'Danemarca',
+                FR: 'Franta',
                 GB: 'Regatul Unit',
                 IT: 'Italia',
                 MA: 'Maroc',

+ 1 - 0
src/js/language/ru_RU.js

@@ -347,6 +347,7 @@
                 CA: 'Канаде',
                 CZ: 'Чешская республика',
                 DK: 'Дании',
+                FR: 'Франции',
                 GB: 'Великобритании',
                 IT: 'Италии',
                 MA: 'Марокко',

+ 1 - 0
src/js/language/sq_AL.js

@@ -347,6 +347,7 @@
                 CA: 'Kanada',
                 CZ: 'Republika Çeke',
                 DK: 'Danimarkë',
+                FR: 'Francë',
                 GB: 'Mbretëria e Bashkuar',
                 IT: 'Itali',
                 MA: 'Marok',

+ 1 - 0
src/js/language/sr_RS.js

@@ -347,6 +347,7 @@
                 CA: 'Kanade',
                 CZ: 'Češke',
                 DK: 'Danske',
+                FR: 'Francuske',
                 GB: 'Engleske',
                 IT: 'Italije',
                 MA: 'Maroka',

+ 1 - 0
src/js/language/sv_SE.js

@@ -347,6 +347,7 @@
                 CA: 'Kanada',
                 CZ: 'Tjeckien',
                 DK: 'Danmark',
+                FR: 'Frankrike',
                 GB: 'Förenade Kungariket',
                 IT: 'Italien',
                 MA: 'Marocko',

+ 1 - 0
src/js/language/th_TH.js

@@ -347,6 +347,7 @@
                 CA: 'แคนาดา',
                 CZ: 'สาธารณรัฐเชค',
                 DK: 'เดนมาร์ก',
+                FR: 'ฝรั่งเศส',
                 GB: 'สหราชอาณาจักร',
                 IT: 'อิตาลี',
                 MA: 'โมร็อกโก',

+ 1 - 0
src/js/language/tr_TR.js

@@ -347,6 +347,7 @@
                 CA: 'Kanada',
                 CZ: 'Çek Cumhuriyeti',
                 DK: 'Danimarka',
+                FR: 'Fransa',
                 GB: 'İngiltere',
                 IT: 'İtalya',
                 MA: 'Fas',

+ 1 - 0
src/js/language/ua_UA.js

@@ -347,6 +347,7 @@
                 CA: 'Канаді',
                 CZ: 'Чехії',
                 DK: 'Данії',
+                FR: 'Франції',
                 GB: 'Великобританії',
                 IT: 'Італії',
                 MA: 'Марокко',

+ 1 - 0
src/js/language/vi_VN.js

@@ -347,6 +347,7 @@
                 CA: 'Canada',
                 CZ: 'Séc',
                 DK: 'Đan Mạch',
+                FR: 'Pháp',
                 GB: 'Vương quốc Anh',
                 IT: 'Ý',
                 MA: 'Maroc',

+ 1 - 0
src/js/language/zh_CN.js

@@ -347,6 +347,7 @@
                 CA: '加拿大',
                 CZ: '捷克共和国',
                 DK: '丹麦',
+                FR: '法国',
                 GB: '英国',
                 IT: '意大利',
                 MA: '摩洛哥',

+ 1 - 0
src/js/language/zh_TW.js

@@ -347,6 +347,7 @@
                 CA: '加拿大',
                 CZ: '捷克共和國',
                 DK: '丹麥',
+                FR: '法國',
                 GB: '英國',
                 IT: '意大利',
                 MA: '摩洛哥',

+ 3 - 4
test/spec/validator/zipCode.js

@@ -22,16 +22,16 @@ describe('zipCode', function() {
                     '<div class="col-md-2">',
                         '<select class="form-control" name="country">',
                             '<option value="">Select a country</option>',
-                            '<option value="US">United States</option>',
                             '<option value="CA">Canada</option>',
                             '<option value="CZ">Czech Republic</option>',
                             '<option value="DK">Denmark</option>',
+                            '<option value="FR">France</option>',
+                            '<option value="GB">United Kingdom</option>',
                             '<option value="IT">Italy</option>',
                             '<option value="NL">Netherlands</option>',
                             '<option value="SE">Sweden</option>',
                             '<option value="SK">Slovakia</option>',
-                            '<option value="GB">United Kingdom</option>',
-                            '<option value="FR">France</option>',
+                            '<option value="US">United States</option>',
                         '</select>',
                     '</div>',
                 '</div>',
@@ -271,5 +271,4 @@ describe('zipCode', function() {
             expect(this.bv.isValid()).toEqual(false);
         }
     });
-
 });