--- mraible <[EMAIL PROTECTED]> wrote: > The following expression seems to do the trick: > reason != 'friend' or (reason == 'friend' and friendEmail != '') > > Writing it in Java seems more logical: > > public void validate() { > if (reason != null && reason.equals("friend") && friendEmail.equals("")) { > addFieldError("friendEmail", "Please provide your friend's email"); > } > } > > Why does the expression use the opposite > (friendEmail != "") where the Java uses > friendEmail == ""?
One tests validity, one tests invalidity? d. ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]