From 77dfa8f03a6f507e3d707b4a89b66ce038e19674 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 1 Nov 2015 14:36:40 -0500 Subject: [PATCH] Fixes decimal rule to only match decimals #3060 --- RELEASE-NOTES.md | 1 + src/definitions/behaviors/form.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 40ba9a421..9220c2348 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -19,6 +19,7 @@ - **Dropdown** - `search dropdown` will now initialize with `autocomplete="off"` to avoid triggering native autocomplete menu - **Form Validation** - Fixes error on `blur` or `change` when using a blank validation object #3131 **Thanks @listepo** - **Form Validation** - Fixes some issues with form integer validation #3053 **Thanks @maturano** +- **Form Validation** - `decimal` rule now **only matches decimals**, to match any number use `number` rule. #3060 - **Form** - Removed `divider` spacing as part of `ui form`, this caused inheritance issues when using special divider types #3092 - **Grid** - Fixes attached segment 1px offset inside grid column #3226 - **Grid** - Fixes some inconsistencies with `widescreen only` class #3161 **Thanks @mdehoog** diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 024997956..7d1dca789 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -1050,7 +1050,7 @@ $.fn.form.settings = { regExp: { bracket : /\[(.*)\]/i, - decimal : /^\-?\d*(\.\d+)?$/, + decimal : /^\d*(\.)\d+/, email : "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, flags : /^\/(.*)\/(.*)?/,