Add required fron-end attributes.

simply required:Ture didn't work, I added widget under type