-
Notifications
You must be signed in to change notification settings - Fork 16
Validate
Instance documents are validated using the instance call validate function. Here's an example:
$instance = XBRL_Instance::FromInstanceDocument( 'my_instance_document.xml' );
$instance->validate();
if ( XBRL_Log::getInstance()->hasConformanceIssueWarning() )
{
echo "Validation error\n";
}
The validate function evaluates the instance and logs an errors through the default global logging instance (see How do I... Change the logging to learn how to change the default logging options). If there is an validation failure the hasConformanceIssueWarning function will return true.
Unlike the instance validation, taxonomy validation is performed as the taxonomy is read if the validation flag is set. The flag is set by calling XBRL::setValidationState. When this function is called without a parameter logging is enabled. It can also be called passing a value of 'false' to disable validation. By default, validation is not enabled.
Once the taxonomy has been loaded the validation status can be accessed using the same technique as an instance document:
if ( XBRL_Log::getInstance()->hasConformanceIssueWarning() )
{
echo "Validation error\n";
}
Copyright © 2021 and later years Lyquidity Solutions Limited
- About us
- Purpose
- XBRL support
- Road Map
- Why PHP?
- Contributing
- License
- Reference links
- Case Study
- Digital Financial Reporting
- Digital Financial Reporting examples
Overview
Class and function reference
Compiled taxonomy structure
Common arrays
Compiling
Compiling
Processing linkbases
Additional taxonomy processing
Extension taxonomies
Compiled taxonomy folder
How do I...?
Navigate a node tree
Find a node in a tree
Find elements in a taxonomy
Load an instance document
Find elements in an instance
Create a simple report
Create a comparison report
Example custom report
Work with dimensions
Sign and Verify
Validate
Change the logging
Capture validation information