I'm trying to validate input field in Magento 2. I have added js to same page, so validation like this data-validate="{required:true, 'validate-email':true}" works.
But how to validate min_text_length or max-words or something that requires number, not just true or false?
This is how I tried but it does not work.
<input value="Name" name="first_name" id="first_name_field" class="input-text" data-validate="{required:true, 'min_text_length':'20'}" type="text">