Date field validating and contacatenating with the validation message

I have a date field and verifying the date is valid/invalid entered by the user. if the user enters invalid format like 10/14/201 and click on Save button, it throws a message by concatenating with the user entered date (i.e. 10/14/201 is not formatted. (mm/dd/yyyy)). Katalon will also captured the same.

date
Q: how to verify in the script if I give a different date?

please share ur suggestions.

I hope i understood your Q correctly. if yes then following.
Capture the error message to variable errmsg
Create another string by concatenating userentered date + “is not formatted. (mm/dd/yyyy))”
Compare the above two strings.

OR if you want to verify the format of user input then regular expressions.
you probably can use this
^((0|1)\d{1})-((0|1|2)\d{1})-((19|20)\d{2})

thanks and understood but the validation message is stored in an object with xpath and attributes right. so how to split from the xpath?

“How to split from xpath” I dont understand your question

May be
use getattribute function or get text funcion in katalon.