client-side validation
function-ize validation