Define a new element validate to do custom regex validation for specific text fields.