Skip to content

Allowing ISO format for dateTime validation? #62

Open

Description

@BkunS

Is it possible to add ISO format support in validation rules of type dateTime?

Activity

  1. jasine commented on Apr 9, 2019

    @jasine

    @BkunS you can use moment and add custom validate

    validator.addRule('ISOTime', (_, value) => {
        if (!moment(value, moment.ISO_8601).isValid()) {
          return 'time must be UTC ISO8601 format';
        }
      });
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