x
1
2
3
4
5
6
7
8
9
10
11
12
<div class="form-field-wrapper"> <label for="age" class="block font-medium text-gray-700 mb-1 text-sm"> Age </label> <div class="relative flex items-center"> <input name="age" value="-5" class="block w-full rounded-md border shadow-sm transition-colors duration-200 text-base py-2 px-4 border-danger-500 bg-white text-gray-900 placeholder-gray-400 focus:border-danger-600 focus:ring-2 focus:ring-danger-500 focus:ring-opacity-20 focus:outline-none" type="number" min="0" max="120" /> </div> <div class="text-danger-600 mt-1 space-y-0.5 text-sm"> <div>Age must be positive</div> <div>Age must be a valid number</div> </div></div>1
2
3
4
5
6
7
8
9
10
11
render BetterUi::Forms::NumberInputComponent.new( name: "age", label: "Age", value: -5, min: 0, max: 120, errors: [ "Age must be positive", "Age must be a valid number" ])No notes provided.
No params configured.