Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Issues
  • #1799
Closed
Open
Issue created Oct 15, 2020 by Pablo Brasero@pablobmContributor

Fields are sometimes marked as required when they are not

Merging https://github.com/thoughtbot/administrate/pull/1521 gave Administrate the ability to detect "required" fields and mark them as such.

However, this detection is not always perfect. On occasion, there will be :if/:unless conditions attached to the validation rule. These are not correctly interepreted by Administrate. So for example:

  validates :amount, :currency, presence: true, if: ->{ stripe? }
Screenshot 2020-10-14 at 18 11 58

Originally posted by @sedubois in https://github.com/thoughtbot/administrate/pull/1521#issuecomment-708506703

Assignee
Assign to
Time tracking