@Balu
I might try something like this (note, it’s not been tested):
if(a.Field_One__c == null || a.Field_Two__c == null) {
if(a.Field_One__c == null) {
a.Field_One__c.addError('Field one was not completed.');
}
if(a.Field_Two__c == null) {
a.Field_Two__c.addError('Field two was not completed.');
}
return null;
}
else {
return std.save();
}
This should (in theory) attach the field error to each field separately.