Grails

Add constraints default in config.groovy

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta3
  • Fix Version/s: 1.2 final
  • Component/s: None
  • Labels:
    None

Description

Add constraint defaults to apply project wide. I spend quite some time adding "nullable=true" and "blank=true" to 99% of the domain class properties in each of my projects. After about 10 Grails projects, it's getting tedious. Adding a default in config.groovy would not break existing applications and make Grails more DRY.

Activity

Hide
Burt Beckwith added a comment -
Show
Burt Beckwith added a comment - See the Global Constraints section in http://www.grails.org/doc/latest/ref/Constraints/Usage.html

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: