<div>Thanks for replay Chri.</div>
<div> </div>
<div>in present product is writting rules validating fields related to table.In this case i writting diff rules.like this is length rule it's working ...</div>
<div> </div>
<div>rule "name.lengthRule:[insert][update][ui]"</div>
<div> when <br> There is an Category<br> Category name length is greater than 8<br> //CategoryBean($catid:catid,$name:name,$descn:descn) <br> //CategoryBean(name != null, eval(name.length() > 8) )<br> then<br> Reject with response : "name length must be less than 8"</div>
<div>//ruleViolationMap.put(drools.getRule().getName(),"name length must be less than 80"); if(!isSuppressMode){ drools.halt(); }<br>end</div>
<div><br> now i am trying write diff rules like email,zipcode,credit card....</div>
<div> i am trying to use regular expressions.In this case negativeTestCases also Build Success.like this...suppose i am set in to the value like ..</div>
<div>bean.setEmail("@chnati");</div>
<div>in this cases actuly Build failure in our testcases.But,this time also Build Success.</div>
<div><br>[*][]Order email address checking for first letter= OrderBean(email matches "@[A-Za-z0-9]*")</div>
<div> </div>
<div>If any possiable give me the related code email,zipcode,phone number.ASAP... <br></div>
<div class="gmail_quote">On Fri, May 30, 2008 at 2:15 PM, Christine <<a href="mailto:christine@christine.nl">christine@christine.nl</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Chanti,<br>what exactly is your question?<br>I think that checking zipcode and credit card formats is easier to do in<br>
java than with rules. Rules are more efficient in more complex situations,<br>like when you have multiple objects that need to meet various conditions.<br><br>Christine<br>
<div>
<div></div>
<div class="Wj3C7c"><br><br>On Fri, May 30, 2008 09:24, Nagaraju runkana wrote:<br>> 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></div></div>> _______________________________________________<br>
> rules-users mailing list<br>> <a href="mailto:rules-users@lists.jboss.org">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><br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">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></div><br>