This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 12, 2014, 4:23 PM
90 Posts

Weird validation error message order

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 9.0.1
  • Role: Developer
  • Tags: Validation
  • Replies: 1

Good gravy!?! Why does this show in such a weird order? There are 4 questions on the page requiring validation. The 4 questions are fields in order of 1, 2, 3, 4.

But the validation at the bottom of the page reports on them in an apparently random order!

 

This is the source code as it appears on the xpage

 

        <xp:inputTextarea style="width:75%" value="#{Report.Agenda}" id="Agenda">
                                <xp:this.validators>
                        <xp:validateRequired
                            message="Question 1 can't be blank">
                        </xp:validateRequired><!-- (1)  -->
                    </xp:this.validators>
        </xp:inputTextarea>

        <xp:br></xp:br>
        <xp:br></xp:br>

        <xp:inputTextarea style="width:75%" value="#{Report.Themes}" id="Themes" required="true">
        <xp:this.validators>
            <xp:validateRequired message="Question 2 can't be blank."></xp:validateRequired>
        </xp:this.validators></xp:inputTextarea>

        <xp:br></xp:br>
        <xp:br></xp:br>

        <xp:inputTextarea style="width:75%" value="#{Report.Why}" id="Why" required="true">
        <xp:this.validators>
            <xp:validateRequired message="Question 3 can't be blank."></xp:validateRequired>
        </xp:this.validators></xp:inputTextarea>

        <xp:br></xp:br>
        <xp:br></xp:br>

        <xp:inputTextarea style="width:75%" value="#{Report.Goals}"  id="Goals" required="true">
        <xp:this.validators>
            <xp:validateRequired message="Question 4 can't be blank."></xp:validateRequired>
        </xp:this.validators></xp:inputTextarea>

Jun 12, 2014, 6:08 PM
586 Posts
validation..

I forget the reason for this...  there is one I THINK...  I mean not like a GOOD reason...  something to do with the in memory tree...  I guess it's fair to say that it's not clear to the computer any desired order...

 

 I've not done much with validation a couple guys have had some good blogs on it...  I THINK Tommy Valand and Mark Leusink..  not sure... you might want to Google...  Or start here:  http://stackoverflow.com/questions/9126614/how-to-set-the-order-of-validation-messages

 

Good Luck


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal