You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@comcast.net> on 2003/09/15 21:26:20 UTC

Presenting at ApacheCon

Accoding to the schedule at http://www.apachecon.org, I'm presenting Tapestry at 11am on Nov 17th.

Who'se gonna be there?

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Geoff Longman <gl...@intelligentworks.com>.
+1

Geoff
----- Original Message -----
From: "tsvetelin" <ts...@rushmore-digital.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Tuesday, September 16, 2003 7:37 AM
Subject: [VOTE] Adding a URL Validator to tapestry valid package


> Hi All,
>
> Last week Jimmi Dyson made a proposal URLValidator to the tacos project
but
> I think its right place is in tapestry valid package. The vaidator support
> both client and server side validations.
>
> I would like to propose this validator to be added to tapestry
distribution.
>
> Here are the things that will be done:
> 1. New UrlValidator.java file will be added to org.apache.tapestry.valid
> package with ASL license agreements.
> 2. A UrlValidator.js file fill be added.
> 3. org.apache.tapestry.valid.ValidationStrings.properties will be updated
> with new error messages. The default messages are:
>   2.1 invalid-url-format = Invalid URL.
>   2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.
>  If you think that the strings need to be changed please make yours
> proposals.
>
> 4. New JUnit Test must be written in validators unit test suite
> 5. A example will be add to workbench application (the page Fields.html
will
> be update to contains a example for new validator).
>
>
> Looking forward
> Tsvetelin.
> PS If someone would like to receive the source code, please contact to me
or
> Jimmi.Dyson@barclayscapital.com.
>
> Here is his mail to tacos mailing list.
> -----Original Message-----
> From: tacos-devel-admin@lists.sourceforge.net
> [mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
> Jimmi.Dyson@barclayscapital.com
> Sent: Friday, September 12, 2003 11:35 AM
> To: tacos-devel@lists.sourceforge.net
> Subject: [Tacos-devel] Custom component: URLValidator
>
>
> Tsvetelin,
>
> I have written a custom validator to validate that a URL entered is of a
> valid format - can limit to specific protocols as well. Includes
client-side
> validation.
>
> If you're interested, then let me know how I can add this to the
repository.
>
> Thanks,
> Jim
>
>
>
> ------------------------------------------------------------------------
> For more information about Barclays Capital, please
> visit our web site at http://www.barcap.com.
>
>
> Internet communications are not secure and therefore the Barclays
> Group does not accept legal responsibility for the contents of this
> message. Although the Barclays Group operates anti-virus programmes,
> it does not accept responsibility for any damage whatsoever that is
> caused by viruses being passed. Any views or opinions presented are
> solely those of the author and do not necessarily represent those of the
> Barclays Group. Replies to this email may be monitored by the Barclays
> Group for operational or business reasons.
>
> ------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Geoff Longman <gl...@intelligentworks.com>.
And a Canadian postal code validator? A#A #A# (alpha-number-alpha
number-alpha-number).

Which reminds me of story..

I was flown down the U.S. by a company to interview for a java job. The
process included several interviews as well as a short demo of thier product
by one thier coders.

They had postal code validation implemented in javascript but it was wrong
(A#A A#A is wrong). When I pointed this out, I was blown off. I guess the
coder was thinking why would he know the validation was incorrect and who
was he to tell me I'm wrong?

Turns out that only thier bigwigs/ HR people knew I was Canadian.

I didn't take the job.

Geoff
----- Original Message -----
From: "Harish Krishnaswamy" <hk...@comcast.net>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Tuesday, September 16, 2003 9:04 AM
Subject: Re: [VOTE] Adding a URL Validator to tapestry valid package


> +1
>
> Do we also may be need a zipcode validator?
>
> -Harish
>
> tsvetelin wrote:
>
> >Hi All,
> >
> >Last week Jimmi Dyson made a proposal URLValidator to the tacos project
but
> >I think its right place is in tapestry valid package. The vaidator
support
> >both client and server side validations.
> >
> >I would like to propose this validator to be added to tapestry
distribution.
> >
> >Here are the things that will be done:
> >1. New UrlValidator.java file will be added to org.apache.tapestry.valid
> >package with ASL license agreements.
> >2. A UrlValidator.js file fill be added.
> >3. org.apache.tapestry.valid.ValidationStrings.properties will be updated
> >with new error messages. The default messages are:
> >  2.1 invalid-url-format = Invalid URL.
> >  2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.
> > If you think that the strings need to be changed please make yours
> >proposals.
> >
> >4. New JUnit Test must be written in validators unit test suite
> >5. A example will be add to workbench application (the page Fields.html
will
> >be update to contains a example for new validator).
> >
> >
> >Looking forward
> >Tsvetelin.
> >PS If someone would like to receive the source code, please contact to me
or
> >Jimmi.Dyson@barclayscapital.com.
> >
> >Here is his mail to tacos mailing list.
> >-----Original Message-----
> >From: tacos-devel-admin@lists.sourceforge.net
> >[mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
> >Jimmi.Dyson@barclayscapital.com
> >Sent: Friday, September 12, 2003 11:35 AM
> >To: tacos-devel@lists.sourceforge.net
> >Subject: [Tacos-devel] Custom component: URLValidator
> >
> >
> >Tsvetelin,
> >
> >I have written a custom validator to validate that a URL entered is of a
> >valid format - can limit to specific protocols as well. Includes
client-side
> >validation.
> >
> >If you're interested, then let me know how I can add this to the
repository.
> >
> >Thanks,
> >Jim
> >
> >
> >
> >------------------------------------------------------------------------
> >For more information about Barclays Capital, please
> >visit our web site at http://www.barcap.com.
> >
> >
> >Internet communications are not secure and therefore the Barclays
> >Group does not accept legal responsibility for the contents of this
> >message. Although the Barclays Group operates anti-virus programmes,
> >it does not accept responsibility for any damage whatsoever that is
> >caused by viruses being passed. Any views or opinions presented are
> >solely those of the author and do not necessarily represent those of the
> >Barclays Group. Replies to this email may be monitored by the Barclays
> >Group for operational or business reasons.
> >
> >------------------------------------------------------------------------
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Are zipcode formats really different in different countries?! Never mind.

-Harish

Harish Krishnaswamy wrote:

> +1
>
> Do we also may be need a zipcode validator?
>
> -Harish
>
> tsvetelin wrote:
>
>> Hi All,
>>
>> Last week Jimmi Dyson made a proposal URLValidator to the tacos 
>> project but
>> I think its right place is in tapestry valid package. The vaidator 
>> support
>> both client and server side validations.
>>
>> I would like to propose this validator to be added to tapestry 
>> distribution.
>>
>> Here are the things that will be done:
>> 1. New UrlValidator.java file will be added to org.apache.tapestry.valid
>> package with ASL license agreements.
>> 2. A UrlValidator.js file fill be added.
>> 3. org.apache.tapestry.valid.ValidationStrings.properties will be 
>> updated
>> with new error messages. The default messages are:
>>  2.1 invalid-url-format = Invalid URL.
>>  2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.
>> If you think that the strings need to be changed please make yours
>> proposals.
>>
>> 4. New JUnit Test must be written in validators unit test suite
>> 5. A example will be add to workbench application (the page 
>> Fields.html will
>> be update to contains a example for new validator).
>>
>>
>> Looking forward
>> Tsvetelin.
>> PS If someone would like to receive the source code, please contact 
>> to me or
>> Jimmi.Dyson@barclayscapital.com.
>>
>> Here is his mail to tacos mailing list.
>> -----Original Message-----
>> From: tacos-devel-admin@lists.sourceforge.net
>> [mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
>> Jimmi.Dyson@barclayscapital.com
>> Sent: Friday, September 12, 2003 11:35 AM
>> To: tacos-devel@lists.sourceforge.net
>> Subject: [Tacos-devel] Custom component: URLValidator
>>
>>
>> Tsvetelin,
>>
>> I have written a custom validator to validate that a URL entered is of a
>> valid format - can limit to specific protocols as well. Includes 
>> client-side
>> validation.
>>
>> If you're interested, then let me know how I can add this to the 
>> repository.
>>
>> Thanks,
>> Jim
>>
>>
>>
>> ------------------------------------------------------------------------
>> For more information about Barclays Capital, please
>> visit our web site at http://www.barcap.com.
>>
>>
>> Internet communications are not secure and therefore the Barclays
>> Group does not accept legal responsibility for the contents of this
>> message. Although the Barclays Group operates anti-virus programmes,
>> it does not accept responsibility for any damage whatsoever that is
>> caused by viruses being passed. Any views or opinions presented are
>> solely those of the author and do not necessarily represent those of the
>> Barclays Group. Replies to this email may be monitored by the Barclays
>> Group for operational or business reasons.
>>
>> ------------------------------------------------------------------------
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


RE: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Bill Lear <ra...@zopyra.com>.
On Tuesday, September 16, 2003 at 10:39:08 (-0400) Howard M. Lewis Ship writes:
>Tapestry uses Jakarata ORO internally, so there's no reason to use
>JDK 1.4 regexp.

True, but some developers may prefer 1.4 regexps, and this way we
could easily provide support for either.


Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


RE: [VOTE] Adding a URL Validator to tapestry valid package

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Tapestry uses Jakarata ORO internally, so there's no reason to use JDK 1.4 regexp.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net] 
> Sent: Tuesday, September 16, 2003 10:29 AM
> To: Tapestry development
> Subject: Re: [VOTE] Adding a URL Validator to tapestry valid package
> 
> 
> Looks good. What lowest JDK version does Tapestry need? May 
> be we should 
> look into other regexp packages for that purpose? Any suggestions?
> 
> -Harish
> 
> Bill Lear wrote:
> 
> >Here's what I have used.  You can create other regexp 
> validators if you 
> >need...
> >
> >Here is its use in a .page file:
> >
> >    <bean name="timeValidator"
> >          class="org.apache.blah.blah.JavaPatternValidator"
> >          lifecycle="page">
> >        <set-property name="pattern">
> >            "(0?[0-9]|1[012]):[0-5][0-9] (am|AM|pm|PM)"
> >        </set-property>
> >        <set-property name="errorMessage">
> >"Invalid time entry.  The form is HH:MM AM|PM.  Example: 12:30 pm"
> >        </set-property>
> >    </bean>
> >
> >I have written the validator as an abstract base class using the GOF 
> >template pattern.  I have so far created one implementation 
> class, one 
> >based on Java 1.4 regexp package.
> >
> >
> >Here are the two Java classes:
> >
> >
> >package ....;
> >
> >import org.apache.tapestry.form.IFormComponent;
> >import org.apache.tapestry.valid.BaseValidator;
> >import org.apache.tapestry.valid.ValidatorException;
> >
> >/**
> > * Abstract base class for pattern (regular expression) 
> validators.  */
> >public abstract class PatternValidator extends BaseValidator {
> >    /**
> >     * The error message to display to the user if validation fails.
> >     */
> >    private String errorMessage;
> >
> >    /**
> >     * The string representation of the regular expression pattern.
> >     */
> >    private String pattern;
> >
> >    /** @return the error message */
> >    public String getErrorMessage() {
> >        return errorMessage;
> >    }
> >
> >    /**
> >     * Sets the error message.
> >     *
> >     * @param errorMessage the error message to set.
> >     */
> >    public void setErrorMessage(String errorMessage) {
> >        this.errorMessage = errorMessage;
> >    }
> >
> >    /**
> >     * @return the pattern
> >     */
> >    public String getPattern() {
> >        return pattern;
> >    }
> >
> >    /**
> >     * Sets the pattern.
> >     *
> >     * @param pattern the pattern to set.
> >     */
> >    public void setPattern(String pattern) {
> >        this.pattern = pattern;
> >    }
> >
> >    public String toString(IFormComponent field, Object value) {
> >        if (value == null) {
> >            return null;
> >        }
> >
> >        return value.toString();
> >    }
> >
> >    /**
> >     * Validates a given input field.  This is implemented as a
> >     * template method (following Gang-of-Four pattern). The template
> >     * implementation is fulfilled by the valid() method.
> >     *
> >     * @param field The form component from which the input is taken.
> >     * @param input The content of the field to validate.
> >     * @return null if the field is not required, or the 
> contents of the field
> >     * if validation is successful.
> >     * @throws ValidatorException if validation fails.
> >     */
> >    public Object toObject(IFormComponent field, String input)
> >        throws ValidatorException {
> >
> >        if (checkRequired(field, input)) {
> >            return null;
> >        }
> >
> >        if (!valid(input)) {
> >            throw new ValidatorException(getErrorMessage(), null);
> >        }
> >
> >        return input;
> >    }
> >
> >    /**
> >     * The template implementation method for the toObject template.
> >     *
> >     * @param input the content of the text field to validate
> >     * @return true if the input is valid
> >     */
> >    protected abstract boolean valid(String input);
> >}
> >
> >
> >Here is the Java 1.4 regexp version.
> >
> >
> >
> >package ...
> >
> >import java.util.regex.Pattern;
> >import java.util.regex.PatternSyntaxException;
> >
> >import org.apache.tapestry.ApplicationRuntimeException;
> >
> >/**
> > * A pattern validator that uses the Java 1.4 regular expression 
> >package.
> > *
> > * @author Bill Lear
> > */
> >public class JavaPatternValidator extends PatternValidator {
> >    /**
> >     * The pattern to use when validating input.
> >     */
> >
> >private Pattern regex;
> >
> >    /**
> >     * @see PatternValidator#valid
> >     */
> >   protected boolean valid(String input) {
> >        if (regex == null) {
> >            try {
> >                regex = Pattern.compile(getPattern());
> >            } catch (PatternSyntaxException pex) {
> >                throw new
> >                    ApplicationRuntimeException(pex.toString());
> >            }
> >        }
> >        return input == null ? false : 
> regex.matcher(input).matches();
> >    }
> >}
> >
> >
> >
> >Bill
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Looks good. What lowest JDK version does Tapestry need? May be we should 
look into other regexp packages for that purpose? Any suggestions?

-Harish

Bill Lear wrote:

>Here's what I have used.  You can create other regexp validators
>if you need...
>
>Here is its use in a .page file:
>
>    <bean name="timeValidator"
>          class="org.apache.blah.blah.JavaPatternValidator"
>          lifecycle="page">
>        <set-property name="pattern">
>            "(0?[0-9]|1[012]):[0-5][0-9] (am|AM|pm|PM)"
>        </set-property>
>        <set-property name="errorMessage">
>"Invalid time entry.  The form is HH:MM AM|PM.  Example: 12:30 pm"
>        </set-property>
>    </bean>
>
>I have written the validator as an abstract base class using the
>GOF template pattern.  I have so far created one implementation
>class, one based on Java 1.4 regexp package.
>
>
>Here are the two Java classes:
>
>
>package ....;
>
>import org.apache.tapestry.form.IFormComponent;
>import org.apache.tapestry.valid.BaseValidator;
>import org.apache.tapestry.valid.ValidatorException;
>
>/**
> * Abstract base class for pattern (regular expression) validators.
> */
>public abstract class PatternValidator extends BaseValidator {
>    /**
>     * The error message to display to the user if validation fails.
>     */
>    private String errorMessage;
>
>    /**
>     * The string representation of the regular expression pattern.
>     */
>    private String pattern;
>
>    /** @return the error message */
>    public String getErrorMessage() {
>        return errorMessage;
>    }
>
>    /**
>     * Sets the error message.
>     *
>     * @param errorMessage the error message to set.
>     */
>    public void setErrorMessage(String errorMessage) {
>        this.errorMessage = errorMessage;
>    }
>
>    /**
>     * @return the pattern
>     */
>    public String getPattern() {
>        return pattern;
>    }
>
>    /**
>     * Sets the pattern.
>     *
>     * @param pattern the pattern to set.
>     */
>    public void setPattern(String pattern) {
>        this.pattern = pattern;
>    }
>
>    public String toString(IFormComponent field, Object value) {
>        if (value == null) {
>            return null;
>        }
>
>        return value.toString();
>    }
>
>    /**
>     * Validates a given input field.  This is implemented as a
>     * template method (following Gang-of-Four pattern). The template
>     * implementation is fulfilled by the valid() method.
>     *
>     * @param field The form component from which the input is taken.
>     * @param input The content of the field to validate.
>     * @return null if the field is not required, or the contents of the field
>     * if validation is successful.
>     * @throws ValidatorException if validation fails.
>     */
>    public Object toObject(IFormComponent field, String input)
>        throws ValidatorException {
>
>        if (checkRequired(field, input)) {
>            return null;
>        }
>
>        if (!valid(input)) {
>            throw new ValidatorException(getErrorMessage(), null);
>        }
>
>        return input;
>    }
>
>    /**
>     * The template implementation method for the toObject template.
>     *
>     * @param input the content of the text field to validate
>     * @return true if the input is valid
>     */
>    protected abstract boolean valid(String input);
>}
>
>
>Here is the Java 1.4 regexp version.
>
>
>
>package ...
>
>import java.util.regex.Pattern;
>import java.util.regex.PatternSyntaxException;
>
>import org.apache.tapestry.ApplicationRuntimeException;
>
>/**
> * A pattern validator that uses the Java 1.4 regular expression package.
> *
> * @author Bill Lear
> */
>public class JavaPatternValidator extends PatternValidator {
>    /**
>     * The pattern to use when validating input.
>     */
>
>private Pattern regex;
>
>    /**
>     * @see PatternValidator#valid
>     */
>   protected boolean valid(String input) {
>        if (regex == null) {
>            try {
>                regex = Pattern.compile(getPattern());
>            } catch (PatternSyntaxException pex) {
>                throw new
>                    ApplicationRuntimeException(pex.toString());
>            }
>        }
>        return input == null ? false : regex.matcher(input).matches();
>    }
>}
>
>
>
>Bill
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Bill Lear <ra...@zopyra.com>.
Here's what I have used.  You can create other regexp validators
if you need...

Here is its use in a .page file:

    <bean name="timeValidator"
          class="org.apache.blah.blah.JavaPatternValidator"
          lifecycle="page">
        <set-property name="pattern">
            "(0?[0-9]|1[012]):[0-5][0-9] (am|AM|pm|PM)"
        </set-property>
        <set-property name="errorMessage">
"Invalid time entry.  The form is HH:MM AM|PM.  Example: 12:30 pm"
        </set-property>
    </bean>

I have written the validator as an abstract base class using the
GOF template pattern.  I have so far created one implementation
class, one based on Java 1.4 regexp package.


Here are the two Java classes:


package ....;

import org.apache.tapestry.form.IFormComponent;
import org.apache.tapestry.valid.BaseValidator;
import org.apache.tapestry.valid.ValidatorException;

/**
 * Abstract base class for pattern (regular expression) validators.
 */
public abstract class PatternValidator extends BaseValidator {
    /**
     * The error message to display to the user if validation fails.
     */
    private String errorMessage;

    /**
     * The string representation of the regular expression pattern.
     */
    private String pattern;

    /** @return the error message */
    public String getErrorMessage() {
        return errorMessage;
    }

    /**
     * Sets the error message.
     *
     * @param errorMessage the error message to set.
     */
    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    /**
     * @return the pattern
     */
    public String getPattern() {
        return pattern;
    }

    /**
     * Sets the pattern.
     *
     * @param pattern the pattern to set.
     */
    public void setPattern(String pattern) {
        this.pattern = pattern;
    }

    public String toString(IFormComponent field, Object value) {
        if (value == null) {
            return null;
        }

        return value.toString();
    }

    /**
     * Validates a given input field.  This is implemented as a
     * template method (following Gang-of-Four pattern). The template
     * implementation is fulfilled by the valid() method.
     *
     * @param field The form component from which the input is taken.
     * @param input The content of the field to validate.
     * @return null if the field is not required, or the contents of the field
     * if validation is successful.
     * @throws ValidatorException if validation fails.
     */
    public Object toObject(IFormComponent field, String input)
        throws ValidatorException {

        if (checkRequired(field, input)) {
            return null;
        }

        if (!valid(input)) {
            throw new ValidatorException(getErrorMessage(), null);
        }

        return input;
    }

    /**
     * The template implementation method for the toObject template.
     *
     * @param input the content of the text field to validate
     * @return true if the input is valid
     */
    protected abstract boolean valid(String input);
}


Here is the Java 1.4 regexp version.



package ...

import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import org.apache.tapestry.ApplicationRuntimeException;

/**
 * A pattern validator that uses the Java 1.4 regular expression package.
 *
 * @author Bill Lear
 */
public class JavaPatternValidator extends PatternValidator {
    /**
     * The pattern to use when validating input.
     */

private Pattern regex;

    /**
     * @see PatternValidator#valid
     */
   protected boolean valid(String input) {
        if (regex == null) {
            try {
                regex = Pattern.compile(getPattern());
            } catch (PatternSyntaxException pex) {
                throw new
                    ApplicationRuntimeException(pex.toString());
            }
        }
        return input == null ? false : regex.matcher(input).matches();
    }
}



Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Yes, I can put one together. Let me know.

-Harish

Howard M. Lewis Ship wrote:

>What we need is a regexp validator ... Tapestry in Action includes a section on creating one.
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>http://jakarta.apache.org/commons/sandbox/hivemind/
>http://javatapestry.blogspot.com
>
>  
>
>>-----Original Message-----
>>From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net] 
>>Sent: Tuesday, September 16, 2003 9:04 AM
>>To: Tapestry development
>>Subject: Re: [VOTE] Adding a URL Validator to tapestry valid package
>>
>>
>>+1
>>
>>Do we also may be need a zipcode validator?
>>
>>-Harish
>>
>>tsvetelin wrote:
>>
>>    
>>
>>>Hi All,
>>>
>>>Last week Jimmi Dyson made a proposal URLValidator to the 
>>>      
>>>
>>tacos project 
>>    
>>
>>>but I think its right place is in tapestry valid package. 
>>>      
>>>
>>The vaidator 
>>    
>>
>>>support both client and server side validations.
>>>
>>>I would like to propose this validator to be added to tapestry 
>>>distribution.
>>>
>>>Here are the things that will be done:
>>>1. New UrlValidator.java file will be added to 
>>>org.apache.tapestry.valid package with ASL license agreements. 2. A 
>>>UrlValidator.js file fill be added. 3. 
>>>org.apache.tapestry.valid.ValidationStrings.properties will 
>>>      
>>>
>>be updated 
>>    
>>
>>>with new error messages. The default messages are:
>>> 2.1 invalid-url-format = Invalid URL.
>>> 2.2 disallowed-protocol = Disallowed protocol - protocol 
>>>      
>>>
>>must be {0}.  
>>    
>>
>>>If you think that the strings need to be changed please make yours 
>>>proposals.
>>>
>>>4. New JUnit Test must be written in validators unit test suite 5. A 
>>>example will be add to workbench application (the page 
>>>      
>>>
>>Fields.html will 
>>    
>>
>>>be update to contains a example for new validator).
>>>
>>>
>>>Looking forward
>>>Tsvetelin.
>>>PS If someone would like to receive the source code, please 
>>>      
>>>
>>contact to 
>>    
>>
>>>me or Jimmi.Dyson@barclayscapital.com.
>>>
>>>Here is his mail to tacos mailing list.
>>>-----Original Message-----
>>>From: tacos-devel-admin@lists.sourceforge.net
>>>[mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of 
>>>Jimmi.Dyson@barclayscapital.com
>>>Sent: Friday, September 12, 2003 11:35 AM
>>>To: tacos-devel@lists.sourceforge.net
>>>Subject: [Tacos-devel] Custom component: URLValidator
>>>
>>>
>>>Tsvetelin,
>>>
>>>I have written a custom validator to validate that a URL 
>>>      
>>>
>>entered is of 
>>    
>>
>>>a valid format - can limit to specific protocols as well. Includes 
>>>client-side validation.
>>>
>>>If you're interested, then let me know how I can add this to the 
>>>repository.
>>>
>>>Thanks,
>>>Jim
>>>
>>>
>>>
>>>-------------------------------------------------------------
>>>      
>>>
>>----------
>>    
>>
>>>-
>>>For more information about Barclays Capital, please
>>>visit our web site at http://www.barcap.com.
>>>
>>>
>>>Internet communications are not secure and therefore the 
>>>      
>>>
>>Barclays Group 
>>    
>>
>>>does not accept legal responsibility for the contents of 
>>>      
>>>
>>this message. 
>>    
>>
>>>Although the Barclays Group operates anti-virus programmes, 
>>>      
>>>
>>it does not 
>>    
>>
>>>accept responsibility for any damage whatsoever that is caused by 
>>>viruses being passed. Any views or opinions presented are 
>>>      
>>>
>>solely those 
>>    
>>
>>>of the author and do not necessarily represent those of the Barclays 
>>>Group. Replies to this email may be monitored by the 
>>>      
>>>
>>Barclays Group for 
>>    
>>
>>>operational or business reasons.
>>>
>>>-------------------------------------------------------------
>>>      
>>>
>>----------
>>    
>>
>>>-
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>>
>>>
>>> 
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>  
>

Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Yup, I shall take a whack.

-Harish

David Solis wrote:

> +1 (to Regex Validator)
>
> I think it is necessary to extend Howard's regex validator to add 
> javascript support.
>
>
> On Tuesday, September 16, 2003, at 09:01  AM, Howard M. Lewis Ship wrote:
>
>> What we need is a regexp validator ... Tapestry in Action includes a 
>> section on creating one.
>>
>> -- 
>> Howard M. Lewis Ship
>> Creator, Tapestry: Java Web Components
>> http://jakarta.apache.org/tapestry
>> http://jakarta.apache.org/commons/sandbox/hivemind/
>> http://javatapestry.blogspot.com
>>
>>> -----Original Message-----
>>> From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net]
>>> Sent: Tuesday, September 16, 2003 9:04 AM
>>> To: Tapestry development
>>> Subject: Re: [VOTE] Adding a URL Validator to tapestry valid package
>>>
>>>
>>> +1
>>>
>>> Do we also may be need a zipcode validator?
>>>
>>> -Harish
>>>
>>> tsvetelin wrote:
>>>
>>>> Hi All,
>>>>
>>>> Last week Jimmi Dyson made a proposal URLValidator to the
>>>
>>> tacos project
>>>
>>>> but I think its right place is in tapestry valid package.
>>>
>>> The vaidator
>>>
>>>> support both client and server side validations.
>>>>
>>>> I would like to propose this validator to be added to tapestry
>>>> distribution.
>>>>
>>>> Here are the things that will be done:
>>>> 1. New UrlValidator.java file will be added to
>>>> org.apache.tapestry.valid package with ASL license agreements. 2. A
>>>> UrlValidator.js file fill be added. 3.
>>>> org.apache.tapestry.valid.ValidationStrings.properties will
>>>
>>> be updated
>>>
>>>> with new error messages. The default messages are:
>>>>  2.1 invalid-url-format = Invalid URL.
>>>>  2.2 disallowed-protocol = Disallowed protocol - protocol
>>>
>>> must be {0}.
>>>
>>>> If you think that the strings need to be changed please make yours
>>>> proposals.
>>>>
>>>> 4. New JUnit Test must be written in validators unit test suite 5. A
>>>> example will be add to workbench application (the page
>>>
>>> Fields.html will
>>>
>>>> be update to contains a example for new validator).
>>>>
>>>>
>>>> Looking forward
>>>> Tsvetelin.
>>>> PS If someone would like to receive the source code, please
>>>
>>> contact to
>>>
>>>> me or Jimmi.Dyson@barclayscapital.com.
>>>>
>>>> Here is his mail to tacos mailing list.
>>>> -----Original Message-----
>>>> From: tacos-devel-admin@lists.sourceforge.net
>>>> [mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
>>>> Jimmi.Dyson@barclayscapital.com
>>>> Sent: Friday, September 12, 2003 11:35 AM
>>>> To: tacos-devel@lists.sourceforge.net
>>>> Subject: [Tacos-devel] Custom component: URLValidator
>>>>
>>>>
>>>> Tsvetelin,
>>>>
>>>> I have written a custom validator to validate that a URL
>>>
>>> entered is of
>>>
>>>> a valid format - can limit to specific protocols as well. Includes
>>>> client-side validation.
>>>>
>>>> If you're interested, then let me know how I can add this to the
>>>> repository.
>>>>
>>>> Thanks,
>>>> Jim
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------
>>>
>>> ----------
>>>
>>>> -
>>>> For more information about Barclays Capital, please
>>>> visit our web site at http://www.barcap.com.
>>>>
>>>>
>>>> Internet communications are not secure and therefore the
>>>
>>> Barclays Group
>>>
>>>> does not accept legal responsibility for the contents of
>>>
>>> this message.
>>>
>>>> Although the Barclays Group operates anti-virus programmes,
>>>
>>> it does not
>>>
>>>> accept responsibility for any damage whatsoever that is caused by
>>>> viruses being passed. Any views or opinions presented are
>>>
>>> solely those
>>>
>>>> of the author and do not necessarily represent those of the Barclays
>>>> Group. Replies to this email may be monitored by the
>>>
>>> Barclays Group for
>>>
>>>> operational or business reasons.
>>>>
>>>> -------------------------------------------------------------
>>>
>>> ----------
>>>
>>>> -
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by David Solis <ds...@legosoft.com.mx>.
+1 (to Regex Validator)

I think it is necessary to extend Howard's regex validator to add 
javascript support.


On Tuesday, September 16, 2003, at 09:01  AM, Howard M. Lewis Ship 
wrote:

> What we need is a regexp validator ... Tapestry in Action includes a 
> section on creating one.
>
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
> http://jakarta.apache.org/commons/sandbox/hivemind/
> http://javatapestry.blogspot.com
>
>> -----Original Message-----
>> From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net]
>> Sent: Tuesday, September 16, 2003 9:04 AM
>> To: Tapestry development
>> Subject: Re: [VOTE] Adding a URL Validator to tapestry valid package
>>
>>
>> +1
>>
>> Do we also may be need a zipcode validator?
>>
>> -Harish
>>
>> tsvetelin wrote:
>>
>>> Hi All,
>>>
>>> Last week Jimmi Dyson made a proposal URLValidator to the
>> tacos project
>>> but I think its right place is in tapestry valid package.
>> The vaidator
>>> support both client and server side validations.
>>>
>>> I would like to propose this validator to be added to tapestry
>>> distribution.
>>>
>>> Here are the things that will be done:
>>> 1. New UrlValidator.java file will be added to
>>> org.apache.tapestry.valid package with ASL license agreements. 2. A
>>> UrlValidator.js file fill be added. 3.
>>> org.apache.tapestry.valid.ValidationStrings.properties will
>> be updated
>>> with new error messages. The default messages are:
>>>  2.1 invalid-url-format = Invalid URL.
>>>  2.2 disallowed-protocol = Disallowed protocol - protocol
>> must be {0}.
>>> If you think that the strings need to be changed please make yours
>>> proposals.
>>>
>>> 4. New JUnit Test must be written in validators unit test suite 5. A
>>> example will be add to workbench application (the page
>> Fields.html will
>>> be update to contains a example for new validator).
>>>
>>>
>>> Looking forward
>>> Tsvetelin.
>>> PS If someone would like to receive the source code, please
>> contact to
>>> me or Jimmi.Dyson@barclayscapital.com.
>>>
>>> Here is his mail to tacos mailing list.
>>> -----Original Message-----
>>> From: tacos-devel-admin@lists.sourceforge.net
>>> [mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
>>> Jimmi.Dyson@barclayscapital.com
>>> Sent: Friday, September 12, 2003 11:35 AM
>>> To: tacos-devel@lists.sourceforge.net
>>> Subject: [Tacos-devel] Custom component: URLValidator
>>>
>>>
>>> Tsvetelin,
>>>
>>> I have written a custom validator to validate that a URL
>> entered is of
>>> a valid format - can limit to specific protocols as well. Includes
>>> client-side validation.
>>>
>>> If you're interested, then let me know how I can add this to the
>>> repository.
>>>
>>> Thanks,
>>> Jim
>>>
>>>
>>>
>>> -------------------------------------------------------------
>> ----------
>>> -
>>> For more information about Barclays Capital, please
>>> visit our web site at http://www.barcap.com.
>>>
>>>
>>> Internet communications are not secure and therefore the
>> Barclays Group
>>> does not accept legal responsibility for the contents of
>> this message.
>>> Although the Barclays Group operates anti-virus programmes,
>> it does not
>>> accept responsibility for any damage whatsoever that is caused by
>>> viruses being passed. Any views or opinions presented are
>> solely those
>>> of the author and do not necessarily represent those of the Barclays
>>> Group. Replies to this email may be monitored by the
>> Barclays Group for
>>> operational or business reasons.
>>>
>>> -------------------------------------------------------------
>> ----------
>>> -
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


RE: [VOTE] Adding a URL Validator to tapestry valid package

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
What we need is a regexp validator ... Tapestry in Action includes a section on creating one.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net] 
> Sent: Tuesday, September 16, 2003 9:04 AM
> To: Tapestry development
> Subject: Re: [VOTE] Adding a URL Validator to tapestry valid package
> 
> 
> +1
> 
> Do we also may be need a zipcode validator?
> 
> -Harish
> 
> tsvetelin wrote:
> 
> >Hi All,
> >
> >Last week Jimmi Dyson made a proposal URLValidator to the 
> tacos project 
> >but I think its right place is in tapestry valid package. 
> The vaidator 
> >support both client and server side validations.
> >
> >I would like to propose this validator to be added to tapestry 
> >distribution.
> >
> >Here are the things that will be done:
> >1. New UrlValidator.java file will be added to 
> >org.apache.tapestry.valid package with ASL license agreements. 2. A 
> >UrlValidator.js file fill be added. 3. 
> >org.apache.tapestry.valid.ValidationStrings.properties will 
> be updated 
> >with new error messages. The default messages are:
> >  2.1 invalid-url-format = Invalid URL.
> >  2.2 disallowed-protocol = Disallowed protocol - protocol 
> must be {0}.  
> >If you think that the strings need to be changed please make yours 
> >proposals.
> >
> >4. New JUnit Test must be written in validators unit test suite 5. A 
> >example will be add to workbench application (the page 
> Fields.html will 
> >be update to contains a example for new validator).
> >
> >
> >Looking forward
> >Tsvetelin.
> >PS If someone would like to receive the source code, please 
> contact to 
> >me or Jimmi.Dyson@barclayscapital.com.
> >
> >Here is his mail to tacos mailing list.
> >-----Original Message-----
> >From: tacos-devel-admin@lists.sourceforge.net
> >[mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of 
> >Jimmi.Dyson@barclayscapital.com
> >Sent: Friday, September 12, 2003 11:35 AM
> >To: tacos-devel@lists.sourceforge.net
> >Subject: [Tacos-devel] Custom component: URLValidator
> >
> >
> >Tsvetelin,
> >
> >I have written a custom validator to validate that a URL 
> entered is of 
> >a valid format - can limit to specific protocols as well. Includes 
> >client-side validation.
> >
> >If you're interested, then let me know how I can add this to the 
> >repository.
> >
> >Thanks,
> >Jim
> >
> >
> >
> >-------------------------------------------------------------
> ----------
> >-
> >For more information about Barclays Capital, please
> >visit our web site at http://www.barcap.com.
> >
> >
> >Internet communications are not secure and therefore the 
> Barclays Group 
> >does not accept legal responsibility for the contents of 
> this message. 
> >Although the Barclays Group operates anti-virus programmes, 
> it does not 
> >accept responsibility for any damage whatsoever that is caused by 
> >viruses being passed. Any views or opinions presented are 
> solely those 
> >of the author and do not necessarily represent those of the Barclays 
> >Group. Replies to this email may be monitored by the 
> Barclays Group for 
> >operational or business reasons.
> >
> >-------------------------------------------------------------
> ----------
> >-
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Harish Krishnaswamy <hk...@comcast.net>.
+1

Do we also may be need a zipcode validator?

-Harish

tsvetelin wrote:

>Hi All,
>
>Last week Jimmi Dyson made a proposal URLValidator to the tacos project but
>I think its right place is in tapestry valid package. The vaidator support
>both client and server side validations.
>
>I would like to propose this validator to be added to tapestry distribution.
>
>Here are the things that will be done:
>1. New UrlValidator.java file will be added to org.apache.tapestry.valid
>package with ASL license agreements.
>2. A UrlValidator.js file fill be added.
>3. org.apache.tapestry.valid.ValidationStrings.properties will be updated
>with new error messages. The default messages are:
>  2.1 invalid-url-format = Invalid URL.
>  2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.
> If you think that the strings need to be changed please make yours
>proposals.
>
>4. New JUnit Test must be written in validators unit test suite
>5. A example will be add to workbench application (the page Fields.html will
>be update to contains a example for new validator).
>
>
>Looking forward
>Tsvetelin.
>PS If someone would like to receive the source code, please contact to me or
>Jimmi.Dyson@barclayscapital.com.
>
>Here is his mail to tacos mailing list.
>-----Original Message-----
>From: tacos-devel-admin@lists.sourceforge.net
>[mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
>Jimmi.Dyson@barclayscapital.com
>Sent: Friday, September 12, 2003 11:35 AM
>To: tacos-devel@lists.sourceforge.net
>Subject: [Tacos-devel] Custom component: URLValidator
>
>
>Tsvetelin,
>
>I have written a custom validator to validate that a URL entered is of a
>valid format - can limit to specific protocols as well. Includes client-side
>validation.
>
>If you're interested, then let me know how I can add this to the repository.
>
>Thanks,
>Jim
>
>
>
>------------------------------------------------------------------------
>For more information about Barclays Capital, please
>visit our web site at http://www.barcap.com.
>
>
>Internet communications are not secure and therefore the Barclays
>Group does not accept legal responsibility for the contents of this
>message. Although the Barclays Group operates anti-virus programmes,
>it does not accept responsibility for any damage whatsoever that is
>caused by viruses being passed. Any views or opinions presented are
>solely those of the author and do not necessarily represent those of the
>Barclays Group. Replies to this email may be monitored by the Barclays
>Group for operational or business reasons.
>
>------------------------------------------------------------------------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Mindbridge <mi...@yahoo.com>.
+1 (to all together)

-mb

----- Original Message ----- 
From: "tsvetelin" <ts...@rushmore-digital.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Tuesday, September 16, 2003 2:37 PM
Subject: [VOTE] Adding a URL Validator to tapestry valid package


> Hi All,
>
> Last week Jimmi Dyson made a proposal URLValidator to the tacos project
but
> I think its right place is in tapestry valid package. The vaidator support
> both client and server side validations.
>
> I would like to propose this validator to be added to tapestry
distribution.
>
> Here are the things that will be done:
> 1. New UrlValidator.java file will be added to org.apache.tapestry.valid
> package with ASL license agreements.
> 2. A UrlValidator.js file fill be added.
> 3. org.apache.tapestry.valid.ValidationStrings.properties will be updated
> with new error messages. The default messages are:
>   2.1 invalid-url-format = Invalid URL.
>   2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.
>  If you think that the strings need to be changed please make yours
> proposals.
>
> 4. New JUnit Test must be written in validators unit test suite
> 5. A example will be add to workbench application (the page Fields.html
will
> be update to contains a example for new validator).
>
>
> Looking forward
> Tsvetelin.
> PS If someone would like to receive the source code, please contact to me
or
> Jimmi.Dyson@barclayscapital.com.
>
> Here is his mail to tacos mailing list.
> -----Original Message-----
> From: tacos-devel-admin@lists.sourceforge.net
> [mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
> Jimmi.Dyson@barclayscapital.com
> Sent: Friday, September 12, 2003 11:35 AM
> To: tacos-devel@lists.sourceforge.net
> Subject: [Tacos-devel] Custom component: URLValidator
>
>
> Tsvetelin,
>
> I have written a custom validator to validate that a URL entered is of a
> valid format - can limit to specific protocols as well. Includes
client-side
> validation.
>
> If you're interested, then let me know how I can add this to the
repository.
>
> Thanks,
> Jim
>
>
>
> ------------------------------------------------------------------------
> For more information about Barclays Capital, please
> visit our web site at http://www.barcap.com.
>
>
> Internet communications are not secure and therefore the Barclays
> Group does not accept legal responsibility for the contents of this
> message. Although the Barclays Group operates anti-virus programmes,
> it does not accept responsibility for any damage whatsoever that is
> caused by viruses being passed. Any views or opinions presented are
> solely those of the author and do not necessarily represent those of the
> Barclays Group. Replies to this email may be monitored by the Barclays
> Group for operational or business reasons.
>
> ------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


RE: [VOTE] Adding a URL Validator to tapestry valid package

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
+1 w/ the unit tests

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: tsvetelin [mailto:tsvetelin.saykov@rushmore-digital.com] 
> Sent: Tuesday, September 16, 2003 7:37 AM
> To: Tapestry development
> Subject: [VOTE] Adding a URL Validator to tapestry valid package
> 
> 
> Hi All,
> 
> Last week Jimmi Dyson made a proposal URLValidator to the 
> tacos project but I think its right place is in tapestry 
> valid package. The vaidator support both client and server 
> side validations.
> 
> I would like to propose this validator to be added to 
> tapestry distribution.
> 
> Here are the things that will be done:
> 1. New UrlValidator.java file will be added to 
> org.apache.tapestry.valid package with ASL license 
> agreements. 2. A UrlValidator.js file fill be added. 3. 
> org.apache.tapestry.valid.ValidationStrings.properties will 
> be updated with new error messages. The default messages are:
>   2.1 invalid-url-format = Invalid URL.
>   2.2 disallowed-protocol = Disallowed protocol - protocol 
> must be {0}.  If you think that the strings need to be 
> changed please make yours proposals.
> 
> 4. New JUnit Test must be written in validators unit test 
> suite 5. A example will be add to workbench application (the 
> page Fields.html will be update to contains a example for new 
> validator).
> 
> 
> Looking forward
> Tsvetelin.
> PS If someone would like to receive the source code, please 
> contact to me or Jimmi.Dyson@barclayscapital.com.
> 
> Here is his mail to tacos mailing list.
> -----Original Message-----
> From: tacos-devel-admin@lists.sourceforge.net
> [mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of 
> Jimmi.Dyson@barclayscapital.com
> Sent: Friday, September 12, 2003 11:35 AM
> To: tacos-devel@lists.sourceforge.net
> Subject: [Tacos-devel] Custom component: URLValidator
> 
> 
> Tsvetelin,
> 
> I have written a custom validator to validate that a URL 
> entered is of a valid format - can limit to specific 
> protocols as well. Includes client-side validation.
> 
> If you're interested, then let me know how I can add this to 
> the repository.
> 
> Thanks,
> Jim
> 
> 
> 
> --------------------------------------------------------------
> ----------
> For more information about Barclays Capital, please
> visit our web site at http://www.barcap.com.
> 
> 
> Internet communications are not secure and therefore the 
> Barclays Group does not accept legal responsibility for the 
> contents of this message. Although the Barclays Group 
> operates anti-virus programmes, it does not accept 
> responsibility for any damage whatsoever that is caused by 
> viruses being passed. Any views or opinions presented are 
> solely those of the author and do not necessarily represent 
> those of the Barclays Group. Replies to this email may be 
> monitored by the Barclays Group for operational or business reasons.
> 
> --------------------------------------------------------------
> ----------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
+1, especially to the unit tests!


On Tuesday, September 16, 2003, at 07:37  AM, tsvetelin wrote:

> Hi All,
>
> Last week Jimmi Dyson made a proposal URLValidator to the tacos 
> project but
> I think its right place is in tapestry valid package. The vaidator 
> support
> both client and server side validations.
>
> I would like to propose this validator to be added to tapestry 
> distribution.
>
> Here are the things that will be done:
> 1. New UrlValidator.java file will be added to 
> org.apache.tapestry.valid
> package with ASL license agreements.
> 2. A UrlValidator.js file fill be added.
> 3. org.apache.tapestry.valid.ValidationStrings.properties will be 
> updated
> with new error messages. The default messages are:
>   2.1 invalid-url-format = Invalid URL.
>   2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.
>  If you think that the strings need to be changed please make yours
> proposals.
>
> 4. New JUnit Test must be written in validators unit test suite
> 5. A example will be add to workbench application (the page 
> Fields.html will
> be update to contains a example for new validator).
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


RE: [VOTE] Adding a URL Validator to tapestry valid package

Posted by Richard Lewis-Shell <rl...@mac.com>.
+1

It would seem useful to be able to specify more than one acceptable protocol
though...

R

-----Original Message-----
From: tsvetelin [mailto:tsvetelin.saykov@rushmore-digital.com] 
Sent: Tuesday, 16 September 2003 11:37 p.m.
To: Tapestry development
Subject: [VOTE] Adding a URL Validator to tapestry valid package


Hi All,

Last week Jimmi Dyson made a proposal URLValidator to the tacos project but
I think its right place is in tapestry valid package. The vaidator support
both client and server side validations.

I would like to propose this validator to be added to tapestry distribution.

Here are the things that will be done:
1. New UrlValidator.java file will be added to org.apache.tapestry.valid
package with ASL license agreements. 2. A UrlValidator.js file fill be
added. 3. org.apache.tapestry.valid.ValidationStrings.properties will be
updated with new error messages. The default messages are:
  2.1 invalid-url-format = Invalid URL.
  2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.  If
you think that the strings need to be changed please make yours proposals.

4. New JUnit Test must be written in validators unit test suite 5. A example
will be add to workbench application (the page Fields.html will be update to
contains a example for new validator).


Looking forward
Tsvetelin.
PS If someone would like to receive the source code, please contact to me or
Jimmi.Dyson@barclayscapital.com.

Here is his mail to tacos mailing list.
-----Original Message-----
From: tacos-devel-admin@lists.sourceforge.net
[mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
Jimmi.Dyson@barclayscapital.com
Sent: Friday, September 12, 2003 11:35 AM
To: tacos-devel@lists.sourceforge.net
Subject: [Tacos-devel] Custom component: URLValidator


Tsvetelin,

I have written a custom validator to validate that a URL entered is of a
valid format - can limit to specific protocols as well. Includes client-side
validation.

If you're interested, then let me know how I can add this to the repository.

Thanks,
Jim



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays Group does
not accept legal responsibility for the contents of this message. Although
the Barclays Group operates anti-virus programmes, it does not accept
responsibility for any damage whatsoever that is caused by viruses being
passed. Any views or opinions presented are solely those of the author and
do not necessarily represent those of the Barclays Group. Replies to this
email may be monitored by the Barclays Group for operational or business
reasons.

------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[VOTE] Adding a URL Validator to tapestry valid package

Posted by tsvetelin <ts...@rushmore-digital.com>.
Hi All,

Last week Jimmi Dyson made a proposal URLValidator to the tacos project but
I think its right place is in tapestry valid package. The vaidator support
both client and server side validations.

I would like to propose this validator to be added to tapestry distribution.

Here are the things that will be done:
1. New UrlValidator.java file will be added to org.apache.tapestry.valid
package with ASL license agreements.
2. A UrlValidator.js file fill be added.
3. org.apache.tapestry.valid.ValidationStrings.properties will be updated
with new error messages. The default messages are:
  2.1 invalid-url-format = Invalid URL.
  2.2 disallowed-protocol = Disallowed protocol - protocol must be {0}.
 If you think that the strings need to be changed please make yours
proposals.

4. New JUnit Test must be written in validators unit test suite
5. A example will be add to workbench application (the page Fields.html will
be update to contains a example for new validator).


Looking forward
Tsvetelin.
PS If someone would like to receive the source code, please contact to me or
Jimmi.Dyson@barclayscapital.com.

Here is his mail to tacos mailing list.
-----Original Message-----
From: tacos-devel-admin@lists.sourceforge.net
[mailto:tacos-devel-admin@lists.sourceforge.net]On Behalf Of
Jimmi.Dyson@barclayscapital.com
Sent: Friday, September 12, 2003 11:35 AM
To: tacos-devel@lists.sourceforge.net
Subject: [Tacos-devel] Custom component: URLValidator


Tsvetelin,

I have written a custom validator to validate that a URL entered is of a
valid format - can limit to specific protocols as well. Includes client-side
validation.

If you're interested, then let me know how I can add this to the repository.

Thanks,
Jim



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays
Group does not accept legal responsibility for the contents of this
message. Although the Barclays Group operates anti-virus programmes,
it does not accept responsibility for any damage whatsoever that is
caused by viruses being passed. Any views or opinions presented are
solely those of the author and do not necessarily represent those of the
Barclays Group. Replies to this email may be monitored by the Barclays
Group for operational or business reasons.

------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Presenting at ApacheCon

Posted by Harish Krishnaswamy <hk...@comcast.net>.
I don't think I can make it, but will you make the presentation 
available on the net?

-Harish

Howard M. Lewis Ship wrote:

>Accoding to the schedule at http://www.apachecon.org, I'm presenting Tapestry at 11am on Nov 17th.
>
>Who'se gonna be there?
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>http://jakarta.apache.org/commons/sandbox/hivemind/
>http://javatapestry.blogspot.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Re: Presenting at ApacheCon

Posted by Harish Krishnaswamy <hk...@comcast.net>.
I don't think I can make it, but will you make the presentation 
available on the net?

-Harish

Howard M. Lewis Ship wrote:

>Accoding to the schedule at http://www.apachecon.org, I'm presenting Tapestry at 11am on Nov 17th.
>
>Who'se gonna be there?
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>http://jakarta.apache.org/commons/sandbox/hivemind/
>http://javatapestry.blogspot.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org