protected function validateCommit($sha, $field) {
		// Check selected commit
		if(empty($sha)) {
			$this->validationError(
				$field,
				"No valid release selected",
				"required"
			);
			return false;
		}

		// Check validity of commit
		if (!preg_match('/^[a-f0-9]{40}$/', $sha)) {
			$this->validationError(
				$field,
				"Invalid release SHA: " . Convert::raw2xml($sha),
				"error"
			);
			return false;
		}

		return true;
	}