Commit 7c4bc839 authored by Ad Schellevis's avatar Ad Schellevis
parent 036e661c
...@@ -67,7 +67,11 @@ class NetworkField extends BaseField ...@@ -67,7 +67,11 @@ class NetworkField extends BaseField
*/ */
public function setNetMaskRequired($value) public function setNetMaskRequired($value)
{ {
$this->internalNetMaskRequired = (trim(strtolower($value)) == 'y' || intval($value) == 1); if (trim(strtoupper($value)) == "Y") {
$this->internalNetMaskRequired = true;
} else {
$this->internalNetMaskRequired = false;
}
} }
/** /**
......
...@@ -102,8 +102,7 @@ class NetworkValidator extends Validator implements ValidatorInterface ...@@ -102,8 +102,7 @@ class NetworkValidator extends Validator implements ValidatorInterface
} }
} }
} }
} } elseif ($this->getOption('netMaskRequired') === true) {
else if($this->getOption('netMaskRequired') === true) {
$result = false; $result = false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment