Skip to content

Implement DBField validation #11403

@emteknetnz

Description

@emteknetnz

Consolidate validation systems contained a POC that added DBField validation via a new shared FIeldsValidator class. We agreed that we should proceed with implementing this for CMS 6

Acceptance criteria

  • Technical approach taken in the POC is used
  • Change the double array config from the POC to instead allow options A), B) and C)
  • Types of validation that could be handled on FieldValidator's are identified, e.g. Email, URL, Int size, etc - note the existing data types
  • Existing FormField validate methods are updated to use FieldValidator's where possible Split off as new issue
  • Some new DB fields are created with validation e.g. DBEmail, DBUrl, DBIp
  • New DB fields are autoscaffold existing equivalent FormField if one exists e.g. EmailField, though DBIp would just be a TextField
  • New DBFields are listed in docs on the Data types page
  • DBField validation is mentioned in the developer docs
  • 6.0.0 changelog calls out that data will no longer be inserted and truncated if it exceeds varchar character lengths, etc, instead it will throw a validation exception
  • Discuss / make follow up cards for "things that we might want to consider changing" on the framework PR

New issues created

Kitchen sink CI CMS 6

CMS 5 PRs

CMS 6 PRs

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions