hi.
I'm trying to validate an input in the form of directory structure.
the directory has to be start with /forms/guide and can also have any sub direcotry existing off it.
the following would be valid entries
/forms/guide
/forms/guide/
/forms/guide/test
I have tried with no luck the following.
/forms/guide_test should be prohibited but is allowed.
While the first option seems to work, the second option of the OR is not picked up.
I would appreciate any help on best way to do this. thanks.
I'm trying to validate an input in the form of directory structure.
the directory has to be start with /forms/guide and can also have any sub direcotry existing off it.
the following would be valid entries
/forms/guide
/forms/guide/
/forms/guide/test
I have tried with no luck the following.
Code:
^/forms/guide([/]?$|/[.*]?$)
^/forms/guide([/]?|/[.*]?)$
/forms/guide_test should be prohibited but is allowed.
While the first option seems to work, the second option of the OR is not picked up.
I would appreciate any help on best way to do this. thanks.