internal void SetValueFromMapToDatabase(IDictionary<string, object> values, IDictionary<string, string> map, MobeelizerFieldAccessor field, bool required, IDictionary<string, string> options, MobeelizerErrorsHolder errors) { String value = null; if (map.ContainsKey(GetFieldName(field.Name))) { value = map[GetFieldName(field.Name)]; } else if (map.ContainsKey(field.Name)) { value = map[field.Name]; } if (value == null && required) { errors.AddFieldCanNotBeEmpty(field.Name); return; } if (value == null) { SetNullValueFromMapToDatabase(values, field, options, errors); } else { SetNotNullValueFromMapToDatabase(values, value, field, options, errors); } }
internal void SetValueFromMapToDatabase(IDictionary <string, object> values, IDictionary <string, string> map, MobeelizerFieldAccessor field, bool required, IDictionary <string, string> options, MobeelizerErrorsHolder errors) { String value = null; if (map.ContainsKey(GetFieldName(field.Name))) { value = map[GetFieldName(field.Name)]; } else if (map.ContainsKey(field.Name)) { value = map[field.Name]; } if (value == null && required) { errors.AddFieldCanNotBeEmpty(field.Name); return; } if (value == null) { SetNullValueFromMapToDatabase(values, field, options, errors); } else { SetNotNullValueFromMapToDatabase(values, value, field, options, errors); } }
public void Validate(IDictionary<String, object> values, MobeelizerFieldAccessor field, bool required, IDictionary<String, String> options, MobeelizerErrorsHolder errors) { Object value = values[field.Name]; if (value == null && required) { errors.AddFieldCanNotBeEmpty(field.Name); return; } if (value != null) { ValidateValue(value, field, options, errors); } }
public void Validate(IDictionary <String, object> values, MobeelizerFieldAccessor field, bool required, IDictionary <String, String> options, MobeelizerErrorsHolder errors) { Object value = values[field.Name]; if (value == null && required) { errors.AddFieldCanNotBeEmpty(field.Name); return; } if (value != null) { ValidateValue(value, field, options, errors); } }