0 votes
by (2 points)
edited

Hello, I am writing the backend. The task is as follows: ban to add the name of & quot; Hazard & quot ;. I understand you need to check to make something like if (name == & quot; Hazard & quot;) return. But where it is checked: in the services? in the controller? or DAO level? Anonymous +

5 Answers

0 votes
by (4 points)
edited
Service takes a parameterized command, and sends the appropriate handler. And there already before adding all the checks - just before recording
0 votes
by (2 points)
edited
Make a database of banned names and refer to it. Well check and make a name in a separate function. Such checks you have written to leave the page is not comme il faut in the code
0 votes
by (2 points)
edited
Create what that yml, writing to the names, upload it to the list if list.contains (urName) changeNameMessage ();
0 votes
by (4 points)
edited
when
0 votes
by (2 points)
edited
In the business layer? If mvc structure without doubt the controller
Welcome to askiry.com, where you can ask questions and receive answers from other members of the community.
...