luckyframework / luckyframework/avram

Add a validation for time based attribute

Open
#623 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Crystal
Stars
183
Forks
67
PR merge metrics
No merged PRs in 30d

Description

I think it would be awesome to have a time based validator where you could say

```crystal
validate_time cc_exp_date, after: 1.day.from_now

validate_time expired_at, before: 1.year.from_now
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test, so start by locating Avram's existing validation API and the handling of time-based attribute values. Compare the requested before and after examples with current validator behavior, and define done as supporting both forms with clear boundary behavior and test coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.