Validation/generation helpers