~ubuntu-branches/ubuntu/hardy/libcgi-formbuilder-perl/hardy

« back to all changes in this revision

Viewing changes to t/2b-test01.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2007-04-21 21:48:43 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070421214843-1x9e3c92nio0ktvi
Tags: 3.05.01-1
* New upstream release.
  + Fix memory leak affecting Catalyst users.
* Update local cdbs snippets:
  + Add upstream-tarball.mk adding get-orig-source rule and more.
  + Fix overloading buildcore.mk.
  + Check copyrights in prebuild (in clean it may choke on not yet
    cleaned stuff), and make sure it runs only once.
  + List non-binary files affected if discovering new copyrights.
  + Update documentation in debian/README.cdbs-tweaks.
* Fix debian/watch file:
  + Fix version mangling (regex implicitly matches against full ver).
  + Extend main regex to match both tar.gz and tgz used in most recent
    release (using horrible regex due to limitations in file format).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
function validate (form) {
6
6
    var alertstr = '';
7
7
    var invalid  = 0;
 
8
    var invalid_fields = new Array();
8
9
 
9
10
    // name: standard text, hidden, password, or textarea box
10
11
    var name = form.elements['name'].value;
11
12
    if (name == null || ! name.match(/^[a-zA-Z]+$/)) {
12
13
        alertstr += '- Invalid entry for the "Name" field\n';
13
14
        invalid++;
 
15
        invalid_fields.push('name');
14
16
    }
15
17
    if (invalid > 0 || alertstr != '') {
16
18
        if (! invalid) invalid = 'The following';   // catch for programmer error