fix required optionset fields client side
add check constraint and support optionsetfield properly