title: SwiftUI TextField max length
body: <p>Is it possible to set a maximum length for <code>TextField</code>?  I was thinking of handling it using <code>onEditingChanged</code> event but it is only called when the user begins/finishes editing and not called while user is typing. I've also read the docs but haven't found anything yet. Is there any workaround?</p>
  
  <pre><code>TextField($text, placeholder: Text("Username"), onEditingChanged: { _ in
    print(self.$text)
  }) {
    print("Finished editing")
  }
  </code></pre>