--- phpMyEdit.class.php 2004-04-04 21:08:50.062860800 +0200 +++ phpMyEdit.class.jsvalid4.php 2004-04-04 21:03:41.619340800 +0200 @@ -694,14 +694,7 @@ 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() || $this->view_operation() || $this->delete_operation()) { $field_to_tab = ''; @@ -757,20 +750,13 @@ } 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'] || $this->fdd[$k]['js']['required'] || isset($this->fdd[$k]['js']['regexp']) ) && ! $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"; - } + echo '// -->', "\n"; + } } if ($this->filter_operation()) {