You need to sign in to do that
Don't have an account?
bretondev
lightning:input : maxlength attribute not working
Hello
It seems the maxlength attribute is not working on the lightning:input. Ihave put a maxlength of 5 but I can enter more than 5 characters.
It seems the maxlength attribute is not working on the lightning:input. Ihave put a maxlength of 5 but I can enter more than 5 characters.
<lightning:input aura:id="cpOuDepartement" type="number" label="Code postal ou Département" maxlength="5" name="cpOuDepartement" value="{!v.searchRequest.cpOuDepartement}" />Am i missing something?
All Answers
you may use below code
Workaround is to use pattern as the user above mentioned, or use attribute max="99999" if you have expected higher bound value
as shown in below code