mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Issue 343 - Problem when condition have var and default attribute both.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9482 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3815aece09
commit
36211cb65b
5 changed files with 120 additions and 28 deletions
|
|
@ -29,6 +29,24 @@
|
|||
|
||||
function toString(){
|
||||
$validator = '';
|
||||
if($this->filter){
|
||||
$validator .= sprintf("$%s_argument->checkFilter('%s');\n"
|
||||
, $this->argument_name
|
||||
, $this->filter
|
||||
);
|
||||
}
|
||||
if($this->min_length){
|
||||
$validator .= sprintf("$%s_argument->checkMinLength(%s);\n"
|
||||
, $this->argument_name
|
||||
, $this->min_length
|
||||
);
|
||||
}
|
||||
if($this->max_length){
|
||||
$validator .= sprintf("$%s_argument->checkMaxLength(%s);\n"
|
||||
, $this->argument_name
|
||||
, $this->max_length
|
||||
);
|
||||
}
|
||||
if(isset($this->default_value)){
|
||||
$this->default_value = new DefaultValue($this->argument_name, $this->default_value);
|
||||
if($this->default_value->isSequence())
|
||||
|
|
@ -48,24 +66,6 @@
|
|||
, $this->argument_name
|
||||
);
|
||||
}
|
||||
if($this->filter){
|
||||
$validator .= sprintf("$%s_argument->checkFilter('%s');\n"
|
||||
, $this->argument_name
|
||||
, $this->filter
|
||||
);
|
||||
}
|
||||
if($this->min_length){
|
||||
$validator .= sprintf("$%s_argument->checkMinLength(%s);\n"
|
||||
, $this->argument_name
|
||||
, $this->min_length
|
||||
);
|
||||
}
|
||||
if($this->max_length){
|
||||
$validator .= sprintf("$%s_argument->checkMaxLength(%s);\n"
|
||||
, $this->argument_name
|
||||
, $this->max_length
|
||||
);
|
||||
}
|
||||
return $validator;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue