Changeset 446 for trunk


Ignore:
Timestamp:
Mar 16, 2010, 10:49:01 PM (15 years ago)
Author:
gav
Message:

Add constraints to Task domain class for targetCompletionDate and comment.

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Task.groovy

    r418 r446  
    3535    static constraints = {
    3636        description(blank:false,maxSize:75)
    37         comment()
     37        comment(maxSize:1000)
    3838        targetStartDate()
    39         targetCompletionDate()
     39        targetCompletionDate(validator: {val, obj ->
     40            if(val.before(obj.targetStartDate))
     41                return 'before.targetStartDate'
     42        })
    4043        leadPerson()
    4144        taskPriority()
  • trunk/grails-app/i18n/messages.properties

    r445 r446  
    9292task.assignedPersons.failedToSave=Could not complete operation, as assignedPerson record failed to save.
    9393tast.taskRecurringSchedule.alreadyExists=This task already has a recurring schedule.
     94task.targetCompletionDate.before.targetStartDate=The target completion date must be equal to or greater than \
     95    the target start date.
    9496
    9597taskRecurringSchedule.notFound=Could not complete operation, recurring schedule not found.
Note: See TracChangeset for help on using the changeset viewer.