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


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.