I know that you can use validators to check data input at the presentation level of the application (for example, regular expression, required fields, etc.), and also to display a message and / or the desired marker icon. Data validation usually belongs to the business layer. How do I avoid supporting two sets of validations for the data that I collect?
EDIT: I know that ad validation is good and that it informs the user and that it is not infallible. The fact remains, is it not that I am testing the same thing in two places?
Yes and no.
. , n-, .
, - . , Active Directory . , , , -, .
- . -. , , . - . , . , , , , . , , . , .
, , DRY ( ) , . . ( , .)
, ( ) , ; , , (-). , , , DRY.
EDIT: , , . - , . , , , ( ), , , .
, . 1. 2. , .
UI , .
. . - -.
UI RequiredFieldValidators , ASP.NET. , . , .
, , :
http://highoncoding.com/Articles/424_Creating_a_Domain_Object_Validation_Framework.aspx
Source: https://habr.com/ru/post/1711269/More articles:Is there any RAK-WB style for bibtex? - coding-styleIPhone Multi-Image Application - memory-managementCocoa Distributed Objects, Slow Polling, Startup, and Non-Response in Activity Monitor - objective-cRuby Resume Analyzer / (Rails Plugin / Gem) - ruby | fooobar.comHow to make cleaning reliable in python? - pythonBash: getting a standard program for a file type - fileSilverlight - Examples of Awesome Demo Applications REQUIRED! - designIn C #, how can I set a DataContext in a ViewModel? - c #Какой хороший проект/способ для того, чтобы разработчик С++ не успел вернуться к нему? - c++Display identical files with consecutive pages on a split screen Emacs - emacsAll Articles