Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to validate one field depending on another field value in aui:form?
<aui:input id="conLowerLimit" name="conLowerLimit"
label="Concentration Lower Limit"
>
<aui:validator name="number"></aui:validator>
</aui:input>
<aui:input id="conUpperLimit" name="conUpperLimit"
label="Concentraion Upper Limit"
>
<aui:validator name="custom"
errorMessage="Please enter value greater than Concentration Lower Limit"></aui:validator>
<aui:validator name="number"></aui:validator>
<aui:validator name="min">'#<portlet:namespace />conLowerLimit'</aui:validator> </aui:input>
Here i need to validate like "Concentraion Upper Limit" value should be greater than "Concentration Lower Limit".
How to achieve this?
Thanks in advance.
You'll need to write your own JavaScript to do the check. There's no
<aui:validator></aui:validator>
that will do this.
Hi Samuel Kong,
Thanks for your support.
Do you have any sample code ?Thanks in advance
Thanks for your support.
Do you have any sample code ?Thanks in advance
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™