Skip to content

feat: more rules of strings, numbers and values - #76

Merged
Insei merged 3 commits into
mainfrom
feat/more-rules
Oct 19, 2026
Merged

Insei merged 3 commits into
mainfrom
feat/more-rules

Conversation

@Insei

@Insei Insei commented Oct 19, 2026

Copy link
Copy Markdown
Owner

New rules, the ground of the rules of the tags of go-playground/validator of the next pull request:

  • str: Alpha, Digits, Numeric, Hexadecimal (with patterns of JSON Schema), Excludes, NotPrefix, NotSuffix, ContainsAny, ExcludesAny, EqualFold, NotEqualField.
  • num: GreaterThan, LessThan (exclusiveMinimum, exclusiveMaximum), GreaterField, LessField.
  • eq: NotEqualField.

Messages in en, ru, de, es, fr (the completeness test of the locales passes), stable codes and params, docs and the skill. 100% coverage.

Insei added 3 commits October 19, 2026 12:17
…ubstring rules

Alpha, Digits, Numeric and Hexadecimal check the formats, Excludes,
NotPrefix, NotSuffix, ContainsAny and ExcludesAny the substrings,
EqualFold compares ignoring case, NotEqualField compares with another
field; with the messages in the five languages, codes and patterns.
The strict comparisons of numbers, with exclusiveMinimum and
exclusiveMaximum of JSON Schema; eq has NotEqualField.
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark diff: 01b634e → 3be6503 (10 runs)

goos: linux
goarch: amd64
pkg: github.com/insei/valigo
cpu: AMD EPYC 7763 64-Core Processor                
           │  base.txt   │           head.txt            │
           │   sec/op    │   sec/op     vs base          │
Validate-4   150.8n ± 3%   149.2n ± 4%  ~ (p=0.541 n=10)

           │  base.txt  │            head.txt            │
           │    B/op    │    B/op     vs base            │
Validate-4   0.000 ± 0%   0.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

           │  base.txt  │            head.txt            │
           │ allocs/op  │ allocs/op   vs base            │
Validate-4   0.000 ± 0%   0.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (01b634e) to head (eb8c268).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #76   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           38        38           
  Lines         1473      1535   +62     
=========================================
+ Hits          1473      1535   +62     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Insei
Insei merged commit 15c4169 into main Oct 19, 2026
6 checks passed
@Insei
Insei deleted the feat/more-rules branch October 19, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants