Skip to content

balOfferNumber is piping invalid input values  #19

@predrag-arsic

Description

@predrag-arsic

When an invalid string value for offer number, the one that has leading or trailing whitespaces ( " 501234567" or "501234567 " ), is pasted inside the input field which has binded [value] property of the <bal-input> form still considers this string as invalid, as it should because it's invalid to regex matching, but it is properly piped, giving the user right output in the input field (for mentioned examples it is "50/1.234.567"). This gives the user the wrong sense that the data provided are correct, though they are not.

As I've investigated a bit, the problem comes down to using parseInt inside balOfferNumber because this will parse to number regardless of whitespaces. Maybe we should reconsider including the check for the length of the string before doing anything else in this function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions