switching mandatory flag from class to attribute because classes are being wiped by the client javascript