You are here

public function Braintree_Error_ValidationErrorCollection::onAttribute in Commerce Braintree 7

File

braintree_php/lib/Braintree/Error/ValidationErrorCollection.php, line 76

Class

Braintree_Error_ValidationErrorCollection
collection of errors enumerating all validation errors for a given request

Code

public function onAttribute($attribute) {
  $matches = array();
  foreach ($this->_errors as $key => $error) {
    if ($error->attribute == $attribute) {
      $matches[] = $error;
    }
  }
  return $matches;
}