<div>i am trying to another way like this ..</div>
<div><br>rule "email.firstletter:[insert][update][ui]"<br>when<br> There is an Order<br> Order email address statr with @ <br> // OrderBean(eval(email.indexOf(<a href="mailto:'@',0">'@',0</a>) == 0)) <br>
then<br> Reject with response : "email address must not start with @"<br>end</div>
<div> </div>
<div>this time also same problem.any another to slove this problem.</div>
<div> </div>
<div> </div>
<div class="gmail_quote">On Fri, May 30, 2008 at 3:32 PM, Jaroslaw Kijanowski <<a href="mailto:kijanowski@gmail.com">kijanowski@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Yeah, but that's not a drools issue any more. I guess your regexp is not sufficient to catch an email address.<br>
The rule will fire when you provide @aa but it will not fire if you use @<a href="http://aa.com/" target="_blank">aa.com</a>, right? google for "Validate an Email Address" and you will find regexps which will handle the "dot" and other chars.
<div>
<div></div>
<div class="Wj3C7c"><br><br>Cheers,<br> Jarek<br><br>Nagaraju runkana wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">HI Jar,<br> Thanks for replay,<br> i am try to like this also: email matches "@\[A-Za-z0-9\]*"<br>
in this case also nagetive test cases Build Success.<br><br>Chanti<br><br>On Fri, May 30, 2008 at 2:49 PM, Jaroslaw Kijanowski <<br><a href="mailto:jaroslaw.kijanowski@redhat.com" target="_blank">jaroslaw.kijanowski@redhat.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br> you have to escape characters with regexp meaning (see docs for details).<br>Try this:<br>email matches "@\[A-Za-z0-9\]*"<br>
phone not matches "\\\\d{3}\\\\-\\\\d{3}\\\\-\\\\d{4}"<br><br>Moreover I guess your rule is anyway broken, you will get a cross product<br>of Orders, so I would remove "There is an Order" from both rules.<br>
<br>Cheers,<br> Jarek<br><br>Nagaraju runkana wrote:<br><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> HI Guys,<br><br>present i am using drools 4.0 in this case.now, i am writting some rules<br>validation using regular expression ZIPCODE,EMAIL,CREDIT CARD number.like<br>
this..<br>--------------------<br>validation.dslr<br>--------------------<br>rule "email.mandatory:[insert][update][ui]"<br> when<br> There is an Order<br> Order email address checking for first letter<br>then<br>
Reject with response : "email address must not start with @ "<br>end<br>rule "phone.mandatory:[insert][update][ui]"<br>when<br> There is an Order<br> Order phone number format should checking<br> then<br>
Reject with response : "The phone number you entered is not valid.Please<br>enter a phone number with the format xxx-xxx-xxxx."\<br>end<br>-----------------------<br>validation.dsl<br>--------------------<br>[*][]Order email address checking for first letter= OrderBean(email<br>
matches<br>"@[A-Za-z0-9]*")<br>[*][]Order phone number format should checking=OrderBean( phone not<br>matches<br>"(/\d{3}\-\d{3}\-\d{4}/)==-1)")<br>this rules are not working ...any one can help me.ASAP<br>
<br>thanks,<br>chanti<br><br><br><br>------------------------------------------------------------------------<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote>_______________________________________________<br>rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote><br><br>------------------------------------------------------------------------<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote><br>_______________________________________________<br>rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>