Skip to content

Model required validation rule not working  #1717

Description

@REJack

Direction
We use github issues to track bugs, not for support.
If you have a support question, or a feature request, raise these as threads on our
forum.

Describe the bug
insert() doesn't check for the 'required' validation rule, I've create a demo with a simple UserModel & UserModelTest.
The UserModel requires email, password & username but if I run insert() without a username it doesn't fail.
cleanValidationRules() removes the username rules and allows inserts without any of the required fields.

CodeIgniter 4 version
since v4.0.0-alpha5

Affected module(s)
CodeIgniter/Model

Expected behavior, and steps to reproduce if appropriate
cleanValidationRules() should only affectupdate().

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions