function validate_nonempty(value) {
  return value != '';
}

function validate_regexp(value, regexp) {
  return value.match(regexp);
}
