Adding special characters for patterns mask

Hi, webix team
How can i allow special characters(,.?_-$%#@) in allow within patterns mask
{view:'text',label:'% field',id:'intrest',labelWidth:120,placeholder:"%",pattern:{mask:'##.##%',allow:/[0-9]/g}},
In above text field i need to allow ' . ' within "allow" property

Tagged:

Comments

  • edited September 4

    @rajkumar
    allow is a regexp pattern
    try this allow:/[0-9.]/g
    AFAIK you don't even need that.
    dot should be accepted by default

  • allow:/[0-9.]/g is not working for below pattern
    pattern:{mask:'#####%',allow:/[0-9.]/g}
    @intregal

  • yes, pattern has this kind of limitations.
    I think that instead of pattern you need to try format:"1.00%"

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!