Validation Errors , Even all the fields filled through JavaScript

33 Views Asked by At

Code : document.getElementById("input-4").value = "Dutta"

Screenshots:

Inspect code for Last name

Validation error when clicks on save button

Description :

I got the validation errors when we click on save button(attached screenshot).

Last Name is the input type and type is text.

using the below line code to display the value.

document.getElementById("input-4").value = "Dutta" but value is displaying , validation is not satisfying.

Highly Appreciated if anyone helps.

I tried with

document.getElementById("input-4").value = "Dutta" document.getElementById("input-4").defaultValue = "Dutta" but not working.

While we inspect the code once we enter manually then value is assigned to attribute value = "Dutta" except that value is not assigning to given attribute in input tag.

0

There are 0 best solutions below