-
How to validate phone number with fix length in liferay
over 9 years ago
-
over 9 years ago
Hi Bhagwan
You are using maxLength validator which used for define maximum character length in input tag.
You can use rangeLength validator for fix character length in liferay. i.e
<aui:validator name="rangeLength" errorMessage="Please Enter 11 digit's">[11,11]</aui:validator>
Below I have updated your code.
<aui:input type="text" id="phoneinput" name="phone" value="" label=""> <aui:validator name="rangeLength" errorMessage="Please Enter 11 digit's">[11,11]</aui:validator> <aui:validator name="digits" ></aui:validator> </aui:input>
1 Answer(s)