Skip to content

Add @regex directive#25

Merged
Folyd merged 1 commit intoaiscriptdev:mainfrom
jgorgel:main
Mar 10, 2025
Merged

Add @regex directive#25
Folyd merged 1 commit intoaiscriptdev:mainfrom
jgorgel:main

Conversation

@jgorgel
Copy link
Copy Markdown
Contributor

@jgorgel jgorgel commented Mar 10, 2025

get /api/validate_phone {
    query {
        """Phone number validation (XXX-XXX-XXXX format)"""
        @regex(pattern="^\d{3}-\d{3}-\d{4}$")
        phone: str
    }
    
    return { "valid": true };
}

Copy link
Copy Markdown
Member

@Folyd Folyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@Folyd Folyd merged commit 1ca8f02 into aiscriptdev:main Mar 10, 2025
6 checks passed
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