feat: Support Regex validation for custom attributes (#7856)
This allows a user to add/update a custom regex and a cue while defining custom attributes(Only applicable for type- text). While adding/editing custom attributes, the values are validated against the attribute definition regex, and if it is incorrect, a cue message or default error message is shown and restricts invalid values from being saved. Fixes: #6866
This commit is contained in:
@@ -501,6 +501,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_12_19_073832) do
|
||||
t.datetime "updated_at", null: false
|
||||
t.text "attribute_description"
|
||||
t.jsonb "attribute_values", default: []
|
||||
t.string "regex_pattern"
|
||||
t.string "regex_cue"
|
||||
t.index ["account_id"], name: "index_custom_attribute_definitions_on_account_id"
|
||||
t.index ["attribute_key", "attribute_model", "account_id"], name: "attribute_key_model_index", unique: true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user