validation rules doesn't work in Blueprint when it is validated using function?

validation rules doesn't work in Blueprint when it is validated using function?

I have tried to create a validation rule in the deal module. it works if I try to create a deal manually or if I try to update the empty field inside a deal. 



but when I try to update the field via the blueprint mandatory field, it seems the validation rules doesn't work, like this:




here is the code I use

  1. entityMap = crmAPIRequest.toMap().get("record");
  2. markingCode = entityMap.get("Marking_Code");
  3. response = Map();
  4. if(!markingCode.contains("/"))
  5. {
  6. response.put('status','error');
  7. response.put('message','Your marking code is written in the wrong format');
  8. }
  9. else if(markingCode != markingCode.toUpperCase())
  10. {
  11. response.put('status','error');
  12. response.put('message','Marking code should be written in the UPPERCASE letter');
  13. }
  14. else
  15. {
  16. response.put('status','success');
  17. }
  18. return response;