68 public function addRule($type, $prompt = NULL, $value = NULL) {
69 if ($type instanceof
Rule) {
72 $this->customRules[] = $type;
73 $this->hasCustomRules =
true;
75 } elseif (\is_array($type)) {
76 $value = JArray::getValue($type,
"value", 2);
77 $prompt = JArray::getValue($type,
"prompt", 1);
78 $type = JArray::getValue($type,
"type", 0);
79 $rule =
new Rule($type, $prompt, $value);
81 $rule =
new Rule($type, $prompt, $value);
83 $this->rules[] = $rule;