Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Commit

Permalink
Fixed bug (?) in length validator message
Browse files Browse the repository at this point in the history
git-svn-id: https://seedframework.svn.sourceforge.net/svnroot/seedframework/trunk@521 e74265ba-5712-0410-b544-ed03b9d7f503
  • Loading branch information
mamihod committed Sep 26, 2008
1 parent 1db94f6 commit f5085a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions model/lib/validation.php
Expand Up @@ -515,10 +515,14 @@ function setup() {
$this->minimum = assign($this->params['minimum'], null);

}


//This seems like it will never be true, since this param is unset in the contructor. sigh.
//unfortunately, no docs really means cant be sure if this is a bug, or related to some other feature.
//Also, can't change it without potentially breaking some other project sigh.So, using an if-else and some duped code.
if (isset($this->params['message'])) {
$this->wrong_length_message = $this->too_long_message = $this->too_short_message = $this->params['message'];

$this->wrong_length_message = $this->too_long_message = $this->too_short_message = $this->params['message'];
} else if ($this->message != '') {
$this->wrong_length_message = $this->too_long_message = $this->too_short_message = $this->message;
}

}
Expand Down

0 comments on commit f5085a9

Please sign in to comment.