Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    You should add atleast one of your tried code so, people could help you on that code, your question seems to asking people guess about your codes and setup, and write you full codes. Commented Jan 25, 2020 at 13:00
  • Why exactly do you "need" this? It's not going to work if you have more than 1 field being validated. Commented Jan 25, 2020 at 13:09
  • @Qirel i want to rename the key in the response. I dont want to validate two fields. Commented Jan 25, 2020 at 13:44
  • @Dilek please let me know if you are not clear about my question. I am not asking for any script. I am asking about the way to do it. I tried the same code in same files that are mentioned and also given in the provided links. I want to rename "email"(text) key with "message"(text) Commented Jan 25, 2020 at 13:45
  • 1
    I don't understand the purpose though, the index is the name of the invalid field -- why would you need to change it? My point is that, should there at one point become more than 1 field, you won't be able to separate which message belongs to which field. Commented Jan 25, 2020 at 14:10