public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } if (ValidationC::should_test_property(MULTIDIMENSIONED_IMAGE_KEY_URL_ICON, $properties_dictionary, true, $limit_to_keys) && !Event::propertyIsValid(MULTIDIMENSIONED_IMAGE_KEY_URL_ICON, $properties_dictionary[MULTIDIMENSIONED_IMAGE_KEY_URL_ICON], $error)) { // Icon url was not valid // return false; } if (ValidationC::should_test_property(MULTIDIMENSIONED_IMAGE_KEY_URL_SMALL, $properties_dictionary, true, $limit_to_keys) && !Event::propertyIsValid(MULTIDIMENSIONED_IMAGE_KEY_URL_SMALL, $properties_dictionary[MULTIDIMENSIONED_IMAGE_KEY_URL_SMALL], $error)) { // Small url was not valid // return false; } if (ValidationC::should_test_property(MULTIDIMENSIONED_IMAGE_KEY_URL_MEDIUM, $properties_dictionary, true, $limit_to_keys) && !Event::propertyIsValid(MULTIDIMENSIONED_IMAGE_KEY_URL_MEDIUM, $properties_dictionary[MULTIDIMENSIONED_IMAGE_KEY_URL_MEDIUM], $error)) { // Medium url was not valid // return false; } if (ValidationC::should_test_property(MULTIDIMENSIONED_IMAGE_KEY_URL_LARGE, $properties_dictionary, true, $limit_to_keys) && !Event::propertyIsValid(MULTIDIMENSIONED_IMAGE_KEY_URL_LARGE, $properties_dictionary[MULTIDIMENSIONED_IMAGE_KEY_URL_LARGE], $error)) { // Large url was not valid // return false; } if (ValidationC::should_test_property(MULTIDIMENSIONED_IMAGE_KEY_URL_ORIGINAL, $properties_dictionary, true, $limit_to_keys) && !Event::propertyIsValid(MULTIDIMENSIONED_IMAGE_KEY_URL_ORIGINAL, $properties_dictionary[MULTIDIMENSIONED_IMAGE_KEY_URL_ORIGINAL], $error)) { // Original url was not valid // return false; } return true; }
public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } if (ValidationC::should_test_property('rawEmail', $properties_dictionary, true, $limit_to_keys) && !Email::propertyIsValid('rawEmail', $properties_dictionary[USER_KEY_EMAIL], $error)) { // Email was not valid // return false; } if (ValidationC::should_test_property('rawPassword', $properties_dictionary, true, $limit_to_keys) && !Password::propertyIsValid('rawPassword', $properties_dictionary[USER_KEY_PASSWORD], $error)) { // Password was not valid // return false; } if (isset($properties_dictionary[USER_KEY_NOTIFICATION_DEVICE_IDENTIFIERS])) { if (ValidationC::should_test_property(USER_KEY_NOTIFICATION_DEVICE_IDENTIFIERS, $properties_dictionary, true, $limit_to_keys) && !User::propertyIsValid(USER_KEY_NOTIFICATION_DEVICE_IDENTIFIERS, $properties_dictionary[USER_KEY_NOTIFICATION_DEVICE_IDENTIFIERS], $error)) { // Password was not valid // return false; } } return true; }
public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } if (ValidationC::should_test_property(CONFINED_DATE_START, $properties_dictionary, true, $limit_to_keys) && !ConfinedDate::propertyIsValid(CONFINED_DATE_START, $properties_dictionary[CONFINED_DATE_START], $error)) { // Start date was not valid // return false; } if (ValidationC::should_test_property(CONFINED_DATE_END, $properties_dictionary, true, $limit_to_keys) && !ConfinedDate::propertyIsValid(CONFINED_DATE_END, $properties_dictionary[CONFINED_DATE_END], $error)) { // End date was not valid // return false; } if (ValidationC::should_test_property(CONFINED_DATE_START, $properties_dictionary, true, $limit_to_keys) && ValidationC::should_test_property(CONFINED_DATE_END, $properties_dictionary, true, $limit_to_keys)) { // Start is before end // if ($properties_dictionary[CONFINED_DATE_START] > $properties_dictionary[CONFINED_DATE_END]) { $error = Error::withDomain(VALIDATION_ERROR_DOMAIN, VALIDATION_ERROR_CODE_INVALID_PROPERTY, 'Start date must be before end.'); return false; } } return true; }
public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } return true; }
public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } if (ValidationC::should_test_property(RANGE_POSITION, $properties_dictionary, true, $limit_to_keys) && !Range::propertyIsValid(RANGE_POSITION, $properties_dictionary[RANGE_POSITION], $error)) { // Position was not valid // return false; } if (ValidationC::should_test_property(RANGE_LENGTH, $properties_dictionary, true, $limit_to_keys) && !Range::propertyIsValid(RANGE_LENGTH, $properties_dictionary[RANGE_LENGTH], $error)) { // Range was not valid // return false; } return true; }
public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } if (ValidationC::should_test_property(LOCATION_KEY_COORDINATE_LATITUDE, $properties_dictionary, true, $limit_to_keys) && !Location::propertyIsValid(LOCATION_KEY_COORDINATE_LATITUDE, $properties_dictionary[LOCATION_KEY_COORDINATE_LATITUDE], $error)) { // Latitude was not valid // return false; } if (ValidationC::should_test_property(LOCATION_KEY_COORDINATE_LONGITUDE, $properties_dictionary, true, $limit_to_keys) && !Location::propertyIsValid(LOCATION_KEY_COORDINATE_LONGITUDE, $properties_dictionary[LOCATION_KEY_COORDINATE_LONGITUDE], $error)) { // Longitude was not valid // return false; } return true; }
public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } if (ValidationC::should_test_property(SPACE_TIME_OCCURRENCE_RELATIONSHIP_NAME_LOCATION, $properties_dictionary, false, $limit_to_keys) && !Location::isValid($properties_dictionary[SPACE_TIME_OCCURRENCE_RELATIONSHIP_NAME_LOCATION], false, $error)) { // Location was not valid // return false; } if (ValidationC::should_test_property(SPACE_TIME_OCCURRENCE_RELATIONSHIP_NAME_CONFINED_DATE, $properties_dictionary, false, $limit_to_keys) && !ConfinedDate::isValid($properties_dictionary[SPACE_TIME_OCCURRENCE_RELATIONSHIP_NAME_CONFINED_DATE], false, $error)) { // Confined date was not valid // return false; } return true; }
public static function isValid(&$properties_dictionary, $limit_to_keys, &$error) { // Check each property is valid // if (!parent::isValid($properties_dictionary, $limit_to_keys, $error)) { return false; } if (ValidationC::should_test_property(EVENT_KEY_DRESS_CODE, $properties_dictionary, true, $limit_to_keys) && !Event::propertyIsValid(EVENT_KEY_DRESS_CODE, $properties_dictionary[EVENT_KEY_DRESS_CODE], $error)) { // Dress code was not valid // return false; } if (ValidationC::should_test_property(EVENT_KEY_PRIVACY, $properties_dictionary, true, $limit_to_keys) && !Event::propertyIsValid(EVENT_KEY_PRIVACY, $properties_dictionary[EVENT_KEY_PRIVACY], $error)) { // Privacy was not valid // return false; } }