added basic validation - required, min, max