2
votes

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)

2

2 Answers

5
votes

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>
1
votes

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.