New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max length for decimal numbers #141

Closed
scoumbourdis opened this Issue Dec 15, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@scoumbourdis
Copy link
Owner

scoumbourdis commented Dec 15, 2012

bzuro added a commit to bzuro/grocery-crud that referenced this issue Sep 18, 2013

scoumbourdis#141 - Maxlength for decimal numbers
Fixed issue scoumbourdis#141, so that decimal numbers have enough max-length in
input field, accounting for the decimal character.
@dodge107

This comment has been minimized.

Copy link

dodge107 commented Aug 5, 2014

Hi,

This bug is still in the code. Here is my fix.

around line 2206 of the main lib.
after this line: if(!empty($field_info->db_max_length))

add this:
if(strstr($field_info->db_max_length, ','))
{
$field_info->db_max_length = str_replace(',', '.', $field_info->db_max_length);
$field_info->db_max_length = ceil($field_info->db_max_length);
}

@scoumbourdis scoumbourdis removed the 1.4.2 label Mar 14, 2015

@bvrignaud

This comment has been minimized.

Copy link
Contributor

bvrignaud commented Sep 1, 2015

I have the same problem with FLOAT.
Why don't you apply the PR ?

@scoumbourdis scoumbourdis added bug and removed task labels Sep 13, 2015

scoumbourdis added a commit that referenced this issue Sep 13, 2015

Merge pull request #327 from scoumbourdis/develop
#141 - Max length for decimal numbers
@scoumbourdis

This comment has been minimized.

Copy link
Owner

scoumbourdis commented Sep 13, 2015

Thanks @bvrignaud for the reminder. I did miss that.

Pull request merged with small changes to master: #327

Closing this ticket. This will be released to public at the next version 1.5.3

Cheers
Johnny

luiscoms added a commit to luiscoms/grocery-crud that referenced this issue Jan 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment