--- phpMyEdit.class.php 2004-01-16 21:40:21.709057600 +0100 +++ phpMyEdit.class.jsvalid2.php 2004-01-16 22:53:01.558212800 +0100 @@ -687,12 +687,6 @@ function form_begin() /* {{{ */ { - /* - Need a lot of work in here - using something like: - $fdd['fieldname']['validate']['js_regex']='/something/'; - $fdd['fieldname']['validate']['php_regex']='something'; - */ $page_name = htmlspecialchars($this->page_name); if ($this->add_operation() || $this->change_operation() || $this->copy_operation() @@ -750,20 +744,14 @@ } if ($this->add_operation() || $this->change_operation() || $this->copy_operation()) { - $required_ar = array(); + $first_required = true; for ($k = 0; $k < $this->num_fds; $k++) { - if ($this->displayed[$k] && $this->fdd[$k]['required'] + if ($this->displayed[$k] && ( $this->fdd[$k]['required'] || isset($this->fdd[$k]['js']['regex']) ) && ! $this->readonly($k) && ! $this->hidden($k)) { - $required_ar[] = $k; - if (isset($this->fdd[$k]['regex']['js'])) { - /* TODO: Use a javascript regex to validate it */ - } - } - } - if (count($required_ar) > 0) { - echo '', "\n"; - } } if ($this->filter_operation()) {