Skip to content

String matches does not work #7

@jprivillaso

Description

@jprivillaso

Hello!

First of all, thanks for the lib. It's really useful. However, I can't make this template work

#if( $limit != '' && $limit.matches('^\d$'))
{ "ok": 1 }
#else
{ "ok": 2 }
#end

The payload is

{
  "limit": "3"
}

Isn't the matches function a built-in method? I'd love to help to implement this workaround if you instruct me how to do it.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions