beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burgess, Benjamin" <>
Subject Custom validation rule
Date Thu, 03 May 2007 20:11:24 GMT
I am having trouble figuring out how to add a custom validation rule to
a form.  This is my form bean in the pageflow:




      public static class MyFormBean implements Serializable {


            private String to;


            private String from;


            public MyFormBean() {



            @Jpf.ValidatableProperty(displayName = "To Date",
validateRequired = @Jpf.ValidateRequired(), validateDate =
@Jpf.ValidateDate(pattern = "MM/dd/yyyy"))

            public String getTo() {

                  return to;



            public void setTo(String to) {

         = to;



            @Jpf.ValidatableProperty(displayName = "From Date",
validateRequired = @Jpf.ValidateRequired(), validateDate =
@Jpf.ValidateDate(pattern = "MM/dd/yyyy"))

            public String getFrom() {

                  return from;



            public void setFrom(String from) {

                  this.from = from;





It is successfully checking that the dates are passed in and in the
correct format, but now I want to make sure that the "from date" is
before the "to date".  What is the most correct way to do this?  Should
I use the "Jpf.ValidateCustomRule
ehive/netui/pageflow/annotations/Jpf.ValidateCustomRule.html> "
annotation, and if so, on which property (seen as how this validation
rule involves two properties)?



This message, including any attachments, contains confidential information intended for a
specific individual and purpose, and is protected by law.  If you are not the intended recipient,
please contact sender immediately by reply e-mail and destroy all copies.  You are hereby
notified that any disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message