Soby Validator is a comprehensive validation library for web developers. It is designed to ease the exhausting process of implementing the necessary code for validating data model or form controls. By writing few lines of code, all of the functionality is implemented right away by Soby Validator for you. This allows time to be concentrated on other innovative software aspects. Soby Validator also comes with extensively customizable configuring options. You can also write and integrate your own validators.
You can find the necessary information to set up your environment from here.
This example demonstrates how to use presence validator in the Soby Validator. "sobyValidate.GetValidator" method takes one parameter. The parameter is the type of the validator. This method returns the validator for the given type. "Validate" method of the validator, returns as invalid if the given value is one of the following empty, null or valid. It returns as valid if the given value is not any of those values.
var isValid = sobyValidate.GetValidator(soby_ValidatorTypes.Presence).Validate(null);
Value is
This example demonstrates how to use filtering in the Soby Data Grid. "AddFilterField" method takes four parameters. First one is the name of the field. Second one is filter value. Third one is type of the field. Fourth one is type of the filter. This method does not trigger data population, it just adds the filterfield which will be used on population.
bookGrid.AddFilterField("Genre", "Picaresque", SobyFieldTypes.Text, SobyFilterTypes.Equal);
Below functionality uses "FilterResult" method which takes four parameters. First one is the name of the field. Second one is filter value. Third one is type of the field. Fourth one is type of the filter. This method triggers the data population.
bookGrid.FilterResult("Genre", "Picaresque", SobyFieldTypes.Text, SobyFilterTypes.Equal);
Filter by Title Year Price Genre as contains
<script src="/media/js/jquery-3.1.0.js" type="text/javascript" ></script> <link href="/media/css/soby.ui.components.css" rel="stylesheet" type="text/css" media="all" /> <link href="/media/css/soby.ui.components.validator.css" rel="stylesheet" type="text/css" media="all" /> <script src="/media/js/soby.service.js" ></script> <script src="/media/js/soby.ui.components.js" ></script> <script src="/media/js/soby.ui.validator.js" ></script> <script src="/Scripts/Tutorials/Validator/general.js" ></script> <div id='soby_CalendarDiv' ></div>