src/objects/MediaAttribute.php
public function validate() {

		$result = parent::validate();

		// Confirm that the current attribute has been given a title.

		if($result->isValid() && !$this->Title) {
			$result->addError('"Title" required!');
		}

		// Allow extension customisation.

		$this->extend('validateMediaAttribute', $result);
		return $result;
	}
public function validate() {

		$result = parent::validate();

		// Confirm that the current attribute has been given a title.

		if($result->isValid() && !$this->Title) {
			$result->addError('"Title" required!');
		}

		// Allow extension customisation.

		$this->extend('validateMediaAttribute', $result);
		return $result;
	}
public function validate ( ) { $ result = parent :: validate ( ) ; // Confirm that the current attribute has been given a title. if ( $ result -> isValid ( ) && ! $ this -> Title ) { $ result -> addError ( '"Title" required!' ) ; } // Allow extension customisation. $ this -> extend ( 'validateMediaAttribute' , $ result ) ; return $ result ; }
Confirm that the current attribute is valid.
Confirm that the current attribute is valid .