I am Creating a file throgh web client and if there are some mandatory fields then until we enter value for those fields, "OK" button doen't enable, but if we upload any file programatically(thorugh webservice API) without applying mandatory properties its allowas to upload it. whereas it should through some exceptin that "Mandatory Field Required".
This mandatory tag has an extra attribute: enforced. If you say
<mandatory enforced="true">true</mandatory>
then you will not be able to check in content that does not have an mandatory field filled. That would mean that you can only check in content via webservices or REST interfaces. Via the web interface you always first check in the content and provide metadata next.