Validate form input with a one-liner