Skip to content

Template helper methods for type validation, value comparison, string functions and regex#1137

Merged
tommysitu merged 1 commit into
SpectoLabs:masterfrom
stuioco:length-template-validation
Jul 17, 2024
Merged

Template helper methods for type validation, value comparison, string functions and regex#1137
tommysitu merged 1 commit into
SpectoLabs:masterfrom
stuioco:length-template-validation

Conversation

@stuioco

@stuioco stuioco commented Jul 17, 2024

Copy link
Copy Markdown
Contributor

Added support for:

{{isNumeric '12.3'}}
{{isAlphanumeric 'abc123'}}
{{isBool 'true'}}
{{isGreaterThan '10' '11'}}
{{isLessThan '11' '10'}}
{{isBetween '1' '3' '5'}}
{{matchesRegex '2022-09-27' '^\d{4}-\d{2}-\d{2}$'}}
{{length 'thisisaverylongstring'}}
{{substring 'thisisalongstring' '7' 'the end'}}
{{rightmostCharacters 'thisisalongstring' 3}}

I have added tests and updated the documentation.
Thanks!
Stuart

@stuioco stuioco requested a review from tommysitu July 17, 2024 11:15

@tommysitu tommysitu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All good 👍

@tommysitu tommysitu merged commit ed78ba2 into SpectoLabs:master Jul 17, 2024
@stuioco stuioco deleted the length-template-validation branch August 15, 2024 10:18
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