Skip to content

Allow calling generate_uid on before_validation #22

@phuibonhoa

Description

@phuibonhoa

It would be nice to be able to set validations on the unique id column. Letting someone set the callback to be before_validation instead of before_create means you are guaranteed to have the unique ID set so that validations can be run. Likewise, it makes it easier to backfill or update records that already exist since you can simply set the column to nil before saving to update it.

Right now since it is on before_create there is no way to have validations on the column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions