Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Validation constructor to validate local date / times #252

Open
jdegoes opened this issue May 25, 2022 · 1 comment
Open

Add a Validation constructor to validate local date / times #252

jdegoes opened this issue May 25, 2022 · 1 comment

Comments

@jdegoes
Copy link
Member

jdegoes commented May 25, 2022

ISSUE

There is no constructor for zio.schema.validation.Validation which can validate a date/time in some format.

SOLUTION

Using other constructors which already exist in zio.schema.validation.Validation (which include regex validation, string length checking, and numeric range checking), introduce a new constructor that satisfies the requirements of this issue.

object Validation {
  ...
  def dateTime(format: String): Validation[String] = ???
}
...
val validation: Validation[String] = Validation.dateTime(""yyyy MM dd")

IMPACT

Increasing the number of constructors for Validation will make it far easier to use the validation package to

WHERE TO LOOK

PROBLEMATIC ISSUES

Issue #248 must be completed first, or at least, this issue must be based off of #244.

@beem812
Copy link
Contributor

beem812 commented May 26, 2022

I'd like to take this issue

tewecske added a commit to tewecske/zio-schema that referenced this issue Aug 3, 2022
tewecske added a commit to tewecske/zio-schema that referenced this issue Aug 6, 2022
tewecske added a commit to tewecske/zio-schema that referenced this issue Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants