length()
Ensure input values always meet character length requirements.
Setup
<!-- Form Container -->
<div sf="myForm">
<form>
<!-- First Name Input with Length Validation -->
<div sf-step="step1">
<label for="firstName">Enter your first name:</label>
<input type="text" name="firstName" id="firstName" sf-validation="length(2,7)" required>
<div class="text-style-error">First name must be between 2 and 7 characters.</div>
<button sf-goto="next">Next</button>
</div>
</form>
</div>
Usage Examples
Attribute Configuration
Video demonstration
length validation control to a text input inside Webflow.Last updated