Soby Web Components

Numeric Validator

This example demonstrates how to use numeric 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 an invalid url. It returns as valid if the given value is a valid url.

 sobyValidate.GetValidator(soby_ValidatorTypes.URL).Validate("http://www.sobiens.com");
Output:true
sobyValidate.GetValidator(soby_ValidatorTypes.URL).Validate("https://www.sobiens.com");
Output:true
sobyValidate.GetValidator(soby_ValidatorTypes.URL).Validate("www.sobiens.com");
Output:false
View source