? ? Pending

User tests: Successful: Unsuccessful:

avatar jeffda
jeffda
5 Mar 2018

The float and double filter changes the value to an integer if there is no number prior to the decimal.
.0125 => 125
0.0125 => 0.0125

Summary of Changes

Modified the RegExp to look for a leading decimal.

Testing Instructions

Create a form with a float/double filtered text field, and pass a decimal value without a leading number.
Example: .0125

Expected result

The value should remain a decimal like one of the following:
.0125
0.0125

Actual result

The value gets converted to a whole number by removing the decimal and leading zeros.
Example: .0125 becomes 125

avatar jeffda jeffda - open - 5 Mar 2018
avatar jeffda jeffda - change - 5 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2018
Category External Library Libraries Composer Change
avatar Anu1601CS
Anu1601CS - comment - 5 Mar 2018

@jeffda no need to open two separate PR for small changes in two files you can fix in same PR

Thanks

avatar ggppdk
ggppdk - comment - 5 Mar 2018

your regexp will allow
.44.55

avatar zero-24
zero-24 - comment - 5 Mar 2018

Can you send this changes against the upstream repo: https://github.com/joomla-framework/utilities else this is going to be overwritten with the next update of the composer package.

avatar wilsonge wilsonge - close - 5 Mar 2018
avatar wilsonge
wilsonge - comment - 5 Mar 2018

What @zero-24 said - this needs to go to our framework repository otherwise it will be overwritten on the next composer update

avatar wilsonge wilsonge - change - 5 Mar 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-03-05 20:58:23
Closed_By wilsonge
Labels Added: ? ?

Add a Comment

Login with GitHub to post a comment