Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Required property in jsp page

Hi I'm using spring mvc and i look for a way to validate my form at client side, so i found this code of html 5.

<form:input path="login" type="text" required />

I put the required property in input element of my form in my jsp page but i got 500 http error.

Etat HTTP 500 - /WEB-INF/pages/index.jsp (line: 44, column: 48) Symbole égal (equal) attendu

org.apache.jasper.JasperException: /WEB-INF/pages/index.jsp (line: 44, column: 62) Symbole égal (equal) attendu
like image 650
Hayi Avatar asked Dec 16 '22 02:12

Hayi


1 Answers

You should be able to use the required attribute, but with XHTML syntax instead of short HTML syntax:

<form:input required="" .../>

or

<form:input required="required" .../>
like image 64
JB Nizet Avatar answered Jan 07 '23 09:01

JB Nizet