public function unapplyRule($FieldName, $RuleName = false)
{
if ($RuleName) {
if (isset($this->_FieldRules[$FieldName])) {
$Index = array_search($RuleName, $this->_FieldRules[$FieldName]);
if ($Index !== false) {
unset($this->_FieldRules[$FieldName][$Index]);
}
}
if (array_key_exists($FieldName, $this->getSchemaRules())) {
$Index = array_search($RuleName, $this->_SchemaRules[$FieldName]);
if ($Index !== false) {
unset($this->_SchemaRules[$FieldName][$Index]);
}
}
} else {
$this->getSchemaRules();
unset($this->_FieldRules[$FieldName], $this->_ValidationFields[$FieldName], $this->_SchemaRules[$FieldName]);
}
}