using regex in node-input-validation

(Jamilah Bello) #1

Hi, so i’m trying to use regex with the node-input-validation package

what i want to do is this ^0[0-9]{10}|^\+44[0-9]{10}

the first problem i’m having is with ‘|’ as it’s being recognised as a pipe

my second problem is with ‘+’

this is how i have it in my code
‘recipients.*’: ‘regex: ^0[0-9]{10}|^\+44[0-9]{10}

0 Likes

(John Gee) #2

(Moved to #community:javascript)

Hi! Can you show the whole code statement rather than just a fragment? Indent it by four spaces to avoid it getting formatted:

indent preformatted text by 4 spaces
1 Like

(system) closed #3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

0 Likes