Hello,
I am using Orbeon XForms through Intalio. However I face several validation issues related to XForms. I need to limit certain input fields to 10 characters. If the user exceeds this limit (10 characters), a message should be shown and "!" mark should be activated. If the input is within the correct limit, it should not show any error message. How do we get about this problem? Thanks in advance. Regards Crishantha |
Hi Crishantha
I work with Intalio XForms as well. If I need to restrict input fields to a certain length, I set up a regular expression in my schema or use a xpath expression in my bind nodeset expression in the xform? ilango
|
Thanks liango,
Will the regular exp. be activated only when the user exceed the limit? If the user does not enter any value, the program should allow to proceed. Thanks a lot Crishantha
|
In reply to this post by crishantha
Hi Crichantha! you can define your constraint within Intalio Form Designer, check the pics I'm attaching. Set XPath constraint for your field, like "string-length(.) <= 10" (see underlined in red) and Constraint violation message, in the attached example it's "Please input less than 10 chars". User will see the alert once s/he hovers on exclamation sign, like in the atatched pic. I do not know though, how to restrict user to input more than 10 chars, i/o allow-validate-alert. That might be even better, but I don't remember right now how to accomplish it in xForms. Cheers, Oleg On 6/20/08, crishanthan <[hidden email]> wrote:
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Oleg!,
Thank you very much for the reply. I managed to solve the issue. Screen shots that you sent were very useful for me to solve the issue. If not a bother I have one more question related to validations. This is regarding the email validation. Here I am specifying a pattern in the "schema type" column in the designer. (Please see the attached zip with the Intalio projectValidation.zip) with a XPath constraint. Here the email pattern works fine, but the "!" appears all the time prompting the user to enter a valid email to proceed. But the problem here is that I do not need this as a mandatory field. The field should be only validated once the user enter something. Please let me know how to get about this too. Thanks a LOT. Crishanthaemail.jpg
|
You'r welcome, Crishantha. The pb you describe is quite common: whenever you define some restriction on a field the "!" sign appears when the field is (yet) empty. I suppose there should be a good practice solution, personally I would do something simple like: <my XPath constraint> or "" I've tested - should work. Cheers Oleg On 6/21/08, crishanthan <[hidden email]> wrote:
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Thanks a lot Oleg for your advice. I will try this and see.
Best Regards Crishantha
|
Hi Oleg
So the XPath constraint for a field that is yet empty but would soon be filled in could contain or be? string-length(.) eq ""? ilango --- On Tue, 6/24/08, crishanthan <[hidden email]> wrote: > From: crishanthan <[hidden email]> > Subject: [ops-users] Re: Re: XForm Validations > To: [hidden email] > Date: Tuesday, June 24, 2008, 1:50 AM > Thanks a lot Oleg for your advice. I will try this and see. > > Best Regards > Crishantha > > > Oleg Zenzin wrote: > > > > You'r welcome, Crishantha. > > > > The pb you describe is quite common: whenever you > define some restriction > > on > > a field the "!" sign appears when the field > is (yet) empty. I suppose > > there > > should be a good practice solution, personally I would > do something simple > > like: > > > > <my XPath constraint> or "" > > > > I've tested - should work. > > > > Cheers > > > > Oleg > > > > On 6/21/08, crishanthan <[hidden email]> > wrote: > >> > >> > >> Hi Oleg!, > >> > >> Thank you very much for the reply. I managed to > solve the issue. > >> > >> Screen shots that you sent were very useful for me > to solve the issue. > >> > >> If not a bother I have one more question related > to validations. > >> > >> This is regarding the email validation. Here I am > specifying a pattern in > >> the "schema type" column in the > designer. (Please see the attached zip > >> with > >> the Intalio project > http://www.nabble.com/file/p18043339/Validation.zip > >> Validation.zip ) with a XPath constraint. > >> > >> Here the email pattern works fine, but the > "!" appears all the time > >> prompting the user to enter a valid email to > proceed. But the problem > >> here > >> is that I do not need this as a mandatory field. > The field should be only > >> validated once the user enter something. > >> > >> Please let me know how to get about this too. > Thanks a LOT. > >> > >> Crishantha > http://www.nabble.com/file/p18043339/email.jpg email.jpg > >> > >> > >> Oleg Zenzin wrote: > >> > > >> > Hi Crichantha! > >> > > >> > you can define your constraint within Intalio > Form Designer, check the > >> > pics > >> > I'm attaching. > >> > > >> > Set XPath constraint for your field, like > "string-length(.) <= 10" (see > >> > underlined in red) and Constraint violation > message, in the attached > >> > example > >> > it's "Please input less than 10 > chars". User will see the alert once > >> s/he > >> > hovers on exclamation sign, like in the > atatched pic. > >> > > >> > I do not know though, how to restrict user to > input more than 10 chars, > >> > i/o > >> > allow-validate-alert. That might be even > better, but I don't remember > >> > right > >> > now how to accomplish it in xForms. > >> > > >> > Cheers, > >> > > >> > Oleg > >> > > >> > On 6/20/08, crishanthan > <[hidden email]> wrote: > >> >> > >> >> > >> >> Hello, > >> >> > >> >> I am using Orbeon XForms through Intalio. > However I face several > >> >> validation > >> >> issues related to XForms. > >> >> > >> >> I need to limit certain input fields to > 10 characters. If the user > >> >> exceeds > >> >> this limit (10 characters), a message > should be shown and "!" mark > >> should > >> >> be > >> >> activated. If the input is within the > correct limit, it should not > >> show > >> >> any > >> >> error message. > >> >> > >> >> How do we get about this problem? > >> >> > >> >> Thanks in advance. > >> >> > >> >> Regards > >> >> Crishantha > >> >> > >> >> -- > >> >> View this message in context: > >> >> > http://www.nabble.com/XForm-Validations-tp18028031p18028031.html > >> >> Sent from the ObjectWeb OPS - Users > mailing list archive at > >> Nabble.com. > >> >> > >> >> > >> >> > >> >> -- > >> >> You receive this message as a subscriber > of the > >> [hidden email] > >> >> list. > >> >> To unsubscribe: > mailto:[hidden email] > >> >> For general help: > mailto:[hidden email]?subject=help > >> >> OW2 mailing lists service home page: > http://www.ow2.org/wws > >> >> > >> >> > >> >> > >> > > >> > > >> > > >> > > >> > -- > >> > You receive this message as a subscriber of > the > >> [hidden email] > >> > list. > >> > To unsubscribe: > mailto:[hidden email] > >> > For general help: > mailto:[hidden email]?subject=help > >> > OW2 mailing lists service home page: > http://www.ow2.org/wws > >> > > >> > > >> > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/XForm-Validations-tp18028031p18043339.html > >> > >> Sent from the ObjectWeb OPS - Users mailing list > archive at Nabble.com. > >> > >> > >> > >> -- > >> You receive this message as a subscriber of the > [hidden email] mailing > >> list. > >> To unsubscribe: > mailto:[hidden email] > >> For general help: > mailto:[hidden email]?subject=help > >> OW2 mailing lists service home page: > http://www.ow2.org/wws > >> > >> > >> > > > > > > -- > > You receive this message as a subscriber of the > [hidden email] mailing > > list. > > To unsubscribe: mailto:[hidden email] > > For general help: mailto:[hidden email]?subject=help > > OW2 mailing lists service home page: > http://www.ow2.org/wws > > > > > > -- > View this message in context: > http://www.nabble.com/XForm-Validations-tp18028031p18086689.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com.-- > You receive this message as a subscriber of the > [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |