Out of the box, I don't believe Jira can use this format for workflow validators. However there are plugins to Jira that can probably help here.
Check out Scripting Suite for Jira - it appears to be able to allow you to use python scripts to do this.
If for some reason that doesn't work, check out https://marketplace.atlassian.com there are possibly other plugins for Jira that can help here.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events