JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › General Discussions › Form validation on blur › Reply To: Form validation on blur
April 5, 2022 at 11:39 am
#103046
Rafa Esparza
Participant
I’m creating like this. I want to have the input empty in the beginning, but not appears in red.
this.form = new Smart.Form('#ejemploForm', {
codigo: ['', {
validationRules: [
{ type: 'required', message: 'Codigo is required' },
]
}],
nombre: ['', {
validationRules: [
{ type: 'required', message: 'Name is required' },
{ type: 'stringLength', min: 2, message: 'First Name requires minimum 2 characters' }
],
}
]
});