public static bool IsFieldNameValid(Dictionary <string, object> data, string fieldName, out string error) { bool result = true; error = ""; if (data.ContainsKey(fieldName)) { error = "Field name already exits."; result = false; } else if (!GDEValidateIdentifier.IsValidIdentifier(fieldName)) { error = "Field name is invalid."; result = false; } return(result); }
public static bool IsSchemaNameValid(string name, out string error) { bool result = true; error = ""; if (AllSchemas.ContainsKey(name)) { error = "Schema name already exists."; result = false; } else if (!GDEValidateIdentifier.IsValidIdentifier(name)) { error = "Schema name is invalid."; result = false; } return(result); }