Skip to content

Conversation

@justrach
Copy link
Owner

Summary

Updates dhi dependency from >=1.1.3 to >=1.1.15 to get new batch validation features.

New Features in dhi 1.1.15

  • Batch Validation APIs - SIMD-accelerated validation for collections:

    • validate_emails_batch() - validate email lists
    • validate_ints_batch(values, min_val, max_val) - validate integer lists with bounds
    • validate_strings_batch(strings, min_len, max_len) - validate string lists with length constraints
    • validate_users_batch(users) - validate user dict lists
  • BatchValidationResult - Result class with:

    • is_all_valid() - check if all items passed validation
    • get_valid_indices() - get indices of valid items
    • get_invalid_indices() - get indices of invalid items

These batch APIs enable high-throughput validation scenarios with minimal Python overhead, complementing TurboAPI's performance focus.

Test Plan

  • CI tests pass with updated dependency
  • Existing dhi model validation works correctly

justrach and others added 2 commits January 25, 2026 18:27
Upgrade dhi from >=1.1.3 to >=1.1.15 for new batch validation features:

- validate_emails_batch() - SIMD-accelerated batch email validation
- validate_ints_batch() - batch integer validation with min/max
- validate_strings_batch() - batch string validation with length constraints
- validate_users_batch() - batch user dict validation
- BatchValidationResult class with is_all_valid(), get_valid_indices(),
  get_invalid_indices() methods

These batch validation APIs enable high-throughput validation scenarios
with minimal Python overhead.

Generated with AI

Co-Authored-By: AI <ai@example.com>
Update test_field_validator to use dhi's built-in StripWhitespace
transformer instead of field_validator decorator. The field_validator
decorator behavior changed in dhi 1.1.15 - built-in string transformers
like StripWhitespace, ToLower, ToUpper are the preferred approach.

Generated with AI

Co-Authored-By: AI <ai@example.com>
@justrach justrach merged commit 1134ce4 into main Jan 25, 2026
11 checks passed
@justrach justrach deleted the justrach/update-dhi branch January 25, 2026 10:54
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