text.setAllowBlank(false);
text.setRegex("^/?(?!.*/{2,})[a-zA-Z_0-9\\-\\./]+$");
text.setMaxLength(250);
text.getMessages().setRegexText(Messages.get("failure.invalid.urlmapping.label", "The vanity URL can only contain letters, digits, dots (.), dashes (-) and no consecutive slashes (/)"));
CellEditor ce = new CellEditor(text);
ce.addListener(Events.BeforeComplete, new Listener<EditorEvent>() {
public void handleEvent(EditorEvent be) {
Window.alert((String) be.getValue());
be.stopEvent();
}
});