RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.16k forks source link

Regex optional group: value is truncated #2273

Open guredd opened 4 years ago

guredd commented 4 years ago

Let's use simple regex with optional group as suffix:

<script>
        $(document).ready(function() {
            $("#id").inputmask({
                regex: '\\d(ab)?'
            }).val('1ab');
        });
</script>

As a result input get's value 1, not 1ab as expected. ab is truncated for some reasons.

RobinHerbots commented 4 years ago

@guredd ,

True, I will check on this.