Skip to content

Issue with float conversion when using french UIKeyboardTypeDecimalPad #21

@ghost

Description

I I've noticed an issue when trying to enter a float value with a french UIKeyboardTypeDecimalPad.
In this case the string value is x,xxx and not x.xxx so [value floatValue] is just returning the decimal part.
What I suggest is to replace it by

float floatValue = [[value stringByReplacingOccurrencesOfString:@"," withString:@"."] floatValue];

in

  • (id)convertValueToObjectPropertyTypeIfNeeded:(NSString*)value attributeMapping:(FKFormAttributeMapping *)attributeMapping

of FKFormMapper.m

Thanks for the good job
Regards
Nicolas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions