Allow string input on regexp validator

This would be very useful because it would allow conversion of a RegExp object AFTER it is transferred in JSON format.