Automattic\WooCommerce\Blocks\Domain\Services\CheckoutFieldTypes
AbstractFieldType::validate
Validates a submitted value against the constraints of this field type.
Method of the class: AbstractFieldType{}
No Hooks.
Returns
\WP_Error|null. Error if the value is not valid for the field type, null otherwise.
Usage
$AbstractFieldType = new AbstractFieldType(); $AbstractFieldType->validate( $value, $field );
- $value(mixed) (required)
- The submitted value.
- $field(array) (required)
- The field.
AbstractFieldType::validate() AbstractFieldType::validate code WC 11.2.1
public function validate( $value, array $field ) {
return null;
}