Not able to set MaxLength property of the Masked-Input

Hi I am using a masked-input component in ember as below:

 {{#each tags as |tag index|~}}
   <li class="emberTagInput-tag">
     {{yield tag}}
     {{#if _isRemoveButtonVisible}}
     <a class="emberTagInput-remove" {{action 'removeTag' index}}></a>
 <li class="emberTagInput-new">
     class=(concat 'emberTagInput-input js-ember-tag-input-new' (if readOnly ' is-disabled'))
     input-filter='[A-Za-z0-9\ \-@#]{1,20}'
     input-filter-message='Complaint Id is not valid.'

And I am using it in my hbs files as below:

<div class="col-md-2">
  <div class="form-group">
    <label for="due-date" class=" control-label">Complaint Id</label>
         addTag=(action 'addNewTag')
         removeTagAtIndex=(action 'removeTagAtIndex')
         as |tag| }}

I want to set max length for the input that I enter as text in the textbox that comes with this component, any help please which property sets the max length that one can enter in it? Thanks a lot please.

As a moderator, I edited the examples above to use code fences so they’re more readable.

1 Like

Assuming for the moment that this is from the ember-cli-maskedinput addon (you didn’t say), it looks from the source code, which you can read out on, like it determines the maxlength automatically from the pattern length and you can’t set it by hand yourself.

If your masked-input is coming from some other addon, then of course the answer might be different.