Good day! All validation takes place on the server, for the front I have only url from backends for which the verification takes place. Can you please tell me how I should pull the regexp from the server to the client side? I do not quite understand the sequence of actions, for the first time I come across a server validation that needs to be dragged to the front.

  • I do not understand the question. As far as I understand, you have some server method to which you transfer data and it returns ok / not ok. Then I do not understand what it means to "pull rehexp from the server to the client side." Do you have some kind of regular service on the server and you want to additionally check with the same regular service on the client or what? - Duck Learns to Take Cover
  • @MakarovAV needs to somehow reflect server validation on the client. that is, in case of an error, a field with a specific error will appear. but how to catch from the server there is an error or is everything OK with checking? (in the same place, the description of the error will also come to the serv). I only have links to which server validation can be accessed and that's it. once the regulars are on the server, I don’t have to write them - Vi Vi
  • I understood again badly. How to catch from the server there is an error or not? - Obviously, the server should say in response, there is an error or not. And if so, which one. - Duck Learns to Take Cover
  • Well, that is, ask the person who writes the server / look in the server code / look in the queries what comes in case of an error. Or the question is, how is it organized in general? - Duck Learns to Take Cover
  • And if someone knows how to pass by: how in a so engine to refer to a nickname with a space? - Duck Learns to Take Cover

2 answers 2

Usually, prohibited characters and other obvious restrictions (for example, length) are eliminated at the front, and after filling in each next field, they send the field value to the server with AJAX, it reports ok or not and why.

    There are ready validation checkers, judging by the tags - this is validation on the jay: http://jqueryvalidation.org/validate/ or http://www.formvalidator.net/

    if the regexs are dragged from the server side to the client side, then copy and paste, including the head, as there are some differences of course!