1
Answer

html input data validation in spring boot REST API

Photo of Ravi Gaddam

Ravi Gaddam

4y
745
1
Hello Friends ,
 
Task 1: 
I have requirement to validate html input data in spring boot REST API.
one input field needs to be check whether exists in database or not while submitting form.
if not exits , needs to send error mesage beside field as "Provide valid Id" 
 
 Task 2 :
same rquirement needs to be worked where form fields built from Javascript  dynamic innerhtml as well.

Answers (1)

0
Photo of Kiran Mohanty
482 2.8k 315.3k 4y
Hi,
You need to send textbox value to the API and API should validate against database. If not valid return error message.
 
What are you expecting here ? or what is blocking you? Are you looking for css to align textbox with error message or SQL validation or something like that  ?