Fixed API test failures due to correct check on error message.
[civicrm-core.git] / api / v3 / MembershipStatus.php
index 3d36680a552b0eab58fd9bbfaab8aefab6280719..499c823fe35736d25460b3c97561462e9aabb7ed 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -43,6 +43,18 @@ function civicrm_api3_membership_status_create($params) {
   return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
 }
 
+/**
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
+ *
+ * @param array $params
+ *   Array of parameters determined by getfields.
+ */
+function _civicrm_api3_membership_status_create_spec(&$params) {
+  $params['name']['api.required'] = 1;
+}
+
 /**
  * Get a membership status.
  *