Reputation:
When using a Dojo Validation Text Box, if I try to submit the XPage without entering any value into the Dojo validation Text Box, I see the message "This value is required". Is there any way of customizing this message? (I wish to have this message in another language)
Upvotes: 2
Views: 518
Reputation: 55
I completely stopped using the built in validations once I found this script by White / Girrard / Valand / Mottolo: A Better Method For XPages SSJS Form Validation
It gives you the ability to react to any state of the input values and I prefer the centralised approach over tweaking inside the single controls themselves.
Upvotes: 1
Reputation: 30960
You can define your customized message as a dojoAttribute:
<xe:djValidationTextBox
id="djValidationTextBox1"
value="#{viewScope.test}"
required="true">
<xe:this.dojoAttributes>
<xp:dojoAttribute
name="missingMessage"
value="Your customized required message!">
</xp:dojoAttribute>
</xe:this.dojoAttributes>
</xe:djValidationTextBox>
Upvotes: 5