validate fields