Repository navigation
feat(service): add email, number, and string_list schema validators - #21
Merged
ATLURI0001 merged 1 commit intoNov 15, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ATLURI0001
deleted the
feat/service-email-number-and-stringlist-validators
branch
November 15, 2026 14:45
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Architecture Overview
This change extends the transport-independent validation pipeline in
python-fullstack/backend/service.pywith three core schema primitives used across authentication, grading, and course taxonomy modules:email(data, key, required=True): RFC-compliant email address format validation, consecutive dot rejection (..), normalization to lowercase, and optional field handling.number(data, key, low=None, high=None): Finite floating-point/numeric validation with strict exclusion of boolean types andNaN/Infinityvalues, complete with boundary assertions.string_list(data, key, min_items=0, max_items=100, item_min_len=1, item_max_len=100): Strict sequence sanitization that strips items, checks array lengths, and asserts string element typing.2. Failure Mode & Diagnostic Analysis
Prior to this patch:
text()validation without structural address verification, allowing malformed strings likemissing-domain@or domain-traversal patterns into the database.float('nan')or boolean flags to pass type checks.3. Engineering Implementation Details
422ApiErrorraises matching existing framework conventions.math.isfinite()guards on all numeric inputs.string_list.4. Verification & Test Evidence
python -m pytest tests/inpython-fullstack/backend.test_email_validatorverified with valid, case-folded, optional, and invalid address patterns.test_number_validatorverified with boundary clamps, booleans, and NaNs.test_string_list_validatorverified with padding, empty arrays, and item type assertions.