Hi @打玻璃
when I open the page the text of Name is with class :'.input-validation-error' but I do not need it it can be null.
First, I checked your code on my Razor page application, there doesn't have the '.input-validation-error' class. Perhaps it is relating your client-side validation package, you can check it.
On my side, the result as below:
Second, if you don't validate the Name and let it nullable, you can change the code as below:
public string? Name{get;set;}
After that, the rendered html elements as below:
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion