Class: atkNodeValidator
Source Location: /class.atknodevalidator.inc
Class atkNodeValidator
Method Summary
| void |
setIgnoreList() |
set the list of fields which will get ignored |
| void |
setMode() |
set the mode in which to validate |
| void |
setNode() |
Set the Node which should be validated |
| void |
setRecord() |
set the record which should get validated. |
Methods
atkNodeValidator atkNodeValidator(
)
|
|
constructor
void setIgnoreList(
array
$fieldArr
)
|
|
set the list of fields which will get ignored
Parameters:
|
array |
$fieldArr: |
List of fields to ignore during validation |
void setMode(
String
$mode
)
|
|
set the mode in which to validate
Parameters:
|
String |
$mode: |
The mode ("edit"/"add") |
void setNode(
&$nodeObj, atkNode
$nodeObj
)
|
|
Set the Node which should be validated
Parameters:
|
atkNode |
$nodeObj: |
The node for validation |
|
|
&$nodeObj: |
|
void setRecord(
&$record, array
$record
)
|
|
set the record which should get validated.
Parameters:
|
array |
$record: |
The record to validate. The record is passed by reference, because errors that are found are stored in the record. |
|
|
&$record: |
|
void validate(
[string
$mode = ""], [array
$ignoreList = array()]
)
|
|
Validate a record
Parameters:
|
string |
$mode: |
Override the mode |
|
array |
$ignoreList: |
Override the ignoreList |
void validateAttributes(
&$record, array
$record
)
|
|
Parameters:
API Tags:
void validateAttributeValue(
&$p_attrib,
&$record, atkAttribute
$p_attrib, array
$record
)
|
|
Validate attribute value.
Parameters:
|
atkAttribute |
$p_attrib: |
pointer to the attribute |
|
array |
$record: |
record |
|
|
&$p_attrib: |
|
|
|
&$record: |
|
void validateUniqueFieldSets(
&$record, array
$record
)
|
|
Check unique field combinations.
The function is called by the validate() method automatically. It is not necessary to call this manually in a validation process. Errors that are found are stored in the $record parameter
Parameters:
|
array |
$record: |
The record to validate |
|
|
&$record: |
|