Don't try this at home kids...

jk2addict on 2006-08-30T01:59:45

I'm a trained shaved monkey. Take a look at FormValidator::Simple::ProfileManager::YAML. It allows one to load FVS profiles from YAML. That's a nice compliment to FormValidator::Simples ability to load error messages form a yaml file.

But apparently, some things can't be easy. Using the [REGEX, qr//] validator is one of those things.

With a little tinkering, the answer appears; assuming the various perl YAML parsers can grok it...YAML can at least.

cart/save:
  - name
  - [ [NOT_BLANK], [LENGTH, 1, 50] ]
cart/delete:
  - id
  -
    -
      - REGEX
      - !perl/regexp:
        REGEXP: '^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$'
        MODIFIERS: i



That's one for the record books.