Validate input for form

This JavaScript checks if field input is not empty.