Field validation in Element.xml (Schema.xml) List of SharePoint 2013

I have a custom list in SharePoint 2013. That custom list made in element.xml and schema.xml. I am trying to put the validation in the list field using the method below.
For example: https://docs.microsoft.com/en-us/sharepoint/dev/schema/validation-element-list
But it does not reflect anything on the SharePoint side.

Has anyone done this before? If yes, can you please suggest me the best way?
And I'm not even sure how to put that script in the validation element.xml

Thank you,
Heena