if (!$('.activity-content input[type=text]:not(input:disabled)').val()) {
reasons.push("lorem ipsum");
}
var requiredField = $('.activity-content-item').find('[required=required]');
for (var i = 0; i < requiredField.length; i++) {
if ($(requiredField[i]).val() == '') {
$(requiredField[i]).addClass('error');
}
}