fix required attr and add email type