basic js working, simplified logic to overall field rather than each constraint on a field