예제 #1
0
        /// <summary>
        /// Applies the browser validation by setting up one or
        /// more input rules on <see cref="IBrowserValidationGenerator"/>.
        /// </summary>
        /// <param name="config">The config.</param>
        /// <param name="inputType">Type of the input.</param>
        /// <param name="generator">The generator.</param>
        /// <param name="attributes">The attributes.</param>
        /// <param name="target">The target.</param>
        public override void ApplyBrowserValidation(BrowserValidationConfiguration config, InputElementType inputType,
                                                    IBrowserValidationGenerator generator, IDictionary attributes,
                                                    string target)
        {
            base.ApplyBrowserValidation(config, inputType, generator, attributes, target);

            generator.SetRegExp(target, expression, BuildErrorMessage());
        }
		/// <summary>
		/// Applies the browser validation by setting up one or
		/// more input rules on <see cref="IBrowserValidationGenerator"/>.
		/// </summary>
		/// <param name="config">The config.</param>
		/// <param name="inputType">Type of the input.</param>
		/// <param name="generator">The generator.</param>
		/// <param name="attributes">The attributes.</param>
		/// <param name="target">The target.</param>
		public override void ApplyBrowserValidation(BrowserValidationConfiguration config, InputElementType inputType,
		                                            IBrowserValidationGenerator generator, IDictionary attributes,
		                                            string target)
		{
			base.ApplyBrowserValidation(config, inputType, generator, attributes, target);

			generator.SetRegExp(target, expression, BuildErrorMessage());
		}
예제 #3
0
		/// <summary>
		/// Applies the browser validation by setting up one or
		/// more input rules on <see cref="IBrowserValidationGenerator"/>.
		/// </summary>
		/// <param name="config">The config.</param>
		/// <param name="inputType">Type of the input.</param>
		/// <param name="generator">The generator.</param>
		/// <param name="attributes">The attributes.</param>
		/// <param name="target">The target.</param>
		public override void ApplyBrowserValidation(BrowserValidationConfiguration config, InputElementType inputType, IBrowserValidationGenerator generator, System.Collections.IDictionary attributes, string target)
		{
			base.ApplyBrowserValidation(config, inputType, generator, attributes, target);

			generator.SetRegExp(target, @"^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$", BuildErrorMessage());
		}
예제 #4
0
        /// <summary>
        /// Applies the browser validation by setting up one or
        /// more input rules on <see cref="IBrowserValidationGenerator"/>.
        /// </summary>
        /// <param name="config">The config.</param>
        /// <param name="inputType">Type of the input.</param>
        /// <param name="generator">The generator.</param>
        /// <param name="attributes">The attributes.</param>
        /// <param name="target">The target.</param>
        public override void ApplyBrowserValidation(BrowserValidationConfiguration config, InputElementType inputType, IBrowserValidationGenerator generator, System.Collections.IDictionary attributes, string target)
        {
            base.ApplyBrowserValidation(config, inputType, generator, attributes, target);

            generator.SetRegExp(target, @"^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$", BuildErrorMessage());
        }