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 (JIRA)" <ta...@jakarta.apache.org> on 2005/08/29 16:32:05 UTC

[jira] Commented: (TAPESTRY-611) Pattern validator invokes wrong client-side JavaScript function

    [ http://issues.apache.org/jira/browse/TAPESTRY-611?page=comments#action_12320426 ] 

Howard M. Lewis Ship commented on TAPESTRY-611:
-----------------------------------------------

You can patch around this by adding:

    <script>
      Tapestry.validate_regexp = Tapestry.validate_regex;
    </script>

This creates an "alias" for validate_regex.  This can be placed in a common Border component.

> Pattern validator invokes wrong client-side JavaScript function
> ---------------------------------------------------------------
>
>          Key: TAPESTRY-611
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-611
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: beta-5
>     Reporter: Howard M. Lewis Ship

>
> Generates almost-right initialization code:
> Tapestry.onsubmit('form', function(event) { Tapestry.require_field(event, 'longitudeDecimalMinutes', 'You must enter a value for Longitude.'); });
> Tapestry.onsubmit('form', function(event) { Tapestry.validate_regexp(event, 'longitudeDecimalMinutes', '\^\\s\*\(\\d\+\)\\s\+\(\\d\+\\\.d\+\)s\*\$', 'Longitude in decimal minutes omits the symbols, and is of the form 13 19.717 (the first number is the degrees, the second the decimal minutes).'); });
> But the function is named "validate_regex" not "validate_regexp".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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