Questions tagged [custom-validators]

236 questions
0
votes
1 answer

Rails custom validator cannot access new associated collection values

I'm trying to write a custom validator to check that the 'Values' added to my 'Report' sum to a specific value (600) per category (behavior). My code follows: Report: class Report < ActiveRecord::Base attr_accessible :value_ids,…
0
votes
1 answer

Custom validation for from and to date in vb.net?

i am developing web application in vb.net, using Custom validation how to validate the from date and To date.. i need to validate the Date in the asp:textbox should be "dd/mm/yyyy" format and i have two date like from date and Todate. So the Todate…
software
  • 706
  • 5
  • 17
  • 39
0
votes
1 answer

Custom validator in client_side_validations

I need to add custom validator for comparing two dates - start date and end date. I created custom validator class MilestoneDatesValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if record.start_date >…
0
votes
2 answers

Validating with JavaScript Function

I Have The Following JavaScript Function: function validateLocality(object, args) { if (document.getElementById("<%=ddlLocality.ClientID %>").value == "0") { args.IsValid = false; } else { args.IsValid…
Jean Claude Abela
  • 577
  • 1
  • 7
  • 24
0
votes
1 answer

Dynamically creating CustomValidator in server control

I have a custom server control which wraps a RadEditor (basically a textarea). I am trying to add a CustomValidator to it dynamically, but I keep getting this error on initial pageload Unable to find control id 'RadEditor1' referenced by the …
msigman
  • 4,364
  • 2
  • 17
  • 29
-1
votes
2 answers

What is the best way to validate reactive form field in Angular2?

I am trying to validate Reactive form field in Angular 2. Here i have written custom validator, I am not sure whether this is right approach to do validation. But any how i am not getting accurate result through my code, some of the test cases are…
-1
votes
1 answer

parsley.js prevents submit after failing ajax validation has been corrected

i have a form where i need to see if an email address entered into the form is already in a database. this check needs to be performed conditionally based on the value of another field in the form. here is the form field:
-1
votes
1 answer

Rails custom validation inside model which belongs_to another

i'm trying to learn ruby and trying to work with business rules and console through active record methods. Here's the problem i'm facing right now, assume the following scenario: I have 3 models: Class User < ApplicationRecord has_many…
-1
votes
1 answer

custom validation Rule to set a particular string in javascript

There is an text field id_number and for the data to be entered in this field should satisfy the following conditions The first 2 letters must be "MU" or "mu" No spaces or special character will be allowed If the value in id_number doesn't match…
Sam
  • 833
  • 3
  • 13
  • 25
-2
votes
1 answer

Django.core.validators MinMaxValueValidator ignored from shell

I'm using django 1.10, created from django.core.validators import MinValueValidator from django.core.validators import MaxValueValidator class B(models.Model): address = models.PositiveSmallIntegerField(validators=[MinValueValidator(0),…
user2239318
  • 1,891
  • 5
  • 20
  • 39
-2
votes
3 answers

page get refresh evenif usercontrol validation is false

I have usercontrol in which I have written Custom-validation which checks whether the entered data in textbox is correct Location or not.On button click click I have checked (page.IsValid) bit, Even-if validation fails it reload the entire page in…
1 2 3
15
16