Skip to content

Is it possible to have an empty Date field? #14

@ychaker

Description

@ychaker

I have field called 'end_date' defined in my schema as:

property 'endDate', Date

and under my User model I have the current validation:

User.validatesFormatOf 'endDate', with: /dddd-dd-dd/, {message: 'should be in the following format: yyyy-mm-dd'}, allowBlank: true

Is there a way to allow for empty/blank values? The validation works but saving the user gives the following error: EndDate is invalid (Invalid Date)

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