如何自定义验证失败时出现的验证消息?
这是我的代码:
<h:form>
<p><h:inputText
id="userNo"
title="Type a number from 0 to 10:">
<f:validateLongRange
minimum="3"
maximum="6"/>
</h:inputText>
<h:commandButton id="submit" value="Submit"
action="response"/>
</p>
<h:message showSummary="true" showDetail="false"
id="errors1"
for="userNo"/>
</h:form>
Run Code Online (Sandbox Code Playgroud)
目前消息如下所示:
j_idt10:userNo: Validation Error: Specified attribute is not between the expected values of 3 and 6.
Run Code Online (Sandbox Code Playgroud)
哪个不是特别用户友好.
我是否可以修改此默认required="true"验证消息以仅显示"值是否必需"?
formId:inputId:验证错误:值是必需的.