title: SAPUI5 Smart Table - Smart Field make field mandatory with annotation
body: <p>Is it possible to make a Property in SAPUI5 Smart Table mandatory so that a user can't leave a field empty while editing it?</p>
  
  <p>I have found <a href="https://wiki.scn.sap.com/wiki/display/EmTech/SAP+Annotations+for+OData+Version+2.0" rel="nofollow noreferrer">this document</a> saying that it should be possible to set mandatory field control on Property in metadata.xml file with annotation like this:</p>
  
  <pre><code>&lt;Property Name="NameLast" Type="Edm.String" Nullable="false" MaxLength="40" sap:label="Last name" sap:field-control="7" /&gt;
  </code></pre>
  
  <p>But with this setting I am getting following error in console:</p>
  
  <pre><code>2017-04-14 11:37:36.691429 MockServer: Resource not found for the segment '7' 
  2017-04-14 11:37:36.707985 The following problem occurred: HTTP request failed404,Not Found,{"error":{"code":404,"message":{"lang":"en","value":"Resource not found for the segment '7'"}}} -  
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Later I found out that sap:field-control should not contain number, but a path expression to another property which contains the number. However this also doesn't work:</p>
  
  <pre><code>&lt;Property Name="NameLast" Type="Edm.String" Nullable="false" MaxLength="40" sap:label="Last name" sap:field-control="Name_fc" /&gt;
  &lt;Property Name="Name_fc" Type="Edm.Byte" /&gt;
  </code></pre>
  
  <p>Value of Name_fc property is '7'. I don't see any console error now, however I can still leave the input (NameLast) field empty without any validation and send it to OData service, which is not what I expect.</p>
  
  <p>Here is a link to an example from sap where they use required fields. I have no idea though how they made it.
  <a href="https://sapui5.netweaver.ondemand.com/sdk/explored.html#/sample/sap.ui.comp.sample.smartfield/code/SmartField.view.xml" rel="nofollow noreferrer">https://sapui5.netweaver.ondemand.com/sdk/explored.html#/sample/sap.ui.comp.sample.smartfield/code/SmartField.view.xml</a></p>