Laravel validation rules for related checkboxes

In my form I have a couple checkboxes and i want at least one of them (or both) to be checked before submitting my form. My input checkboxes are named car and bike. In my controller i am validating my request $this->validate($request, [ ...
more »

2017-04-22 19:04 (1) Answers

Data constraint rejects all new entries

COUNTIF($A$2:$A$1048576; A2)=1 is a rule I've defined in Data validation -> custom. The idea is to reject each new entry that already exists in the table. Unfortunately, no matter what I add to the table, it is rejected, even if its value in row c...
more »

2017-04-22 14:04 (1) Answers

object as List<long> always return null

I wanted to ensure the list property of my model is not empty,so i created a ValidationAttribute, but the value as List< long > always return null even if the property decorated with NoEmpty is of type List< long >. why? and how to do it prope...
more »

2017-04-22 10:04 (1) Answers

Custom type string with validation "EmailAddress"

Below I have a bit of typescript code. My intention her is to create a new custom type for an email address, a string with specific validation. I'd like a way of ensuring the string argument is already validated as a specific type. The code below doe...
more »

2017-04-22 07:04 (4) Answers

Angular 2 Forms Manually Mark invalid

I am working on a login form and if the user enters invalid credentials we want to mark both the email and password fields as invalid and display a message that says the login failed. How do I go about setting these fields to be invalid from an obser...
more »

2017-04-22 01:04 (1) Answers

HTML input pattern not working validation

I have very strange issue. in a very sample search form with one input field: <input pattern="\S.{3,}" name="text"/> The validation fails for value dds sdsd, but JS says it's Ok. /\S.{3,}/.test(' dds sdsd') true /\S.{3,}/.test(...
more »

2017-04-22 00:04 (1) Answers

Validation MarkInvalid Textbox using MVVM

I have a textbox that has validation on it, in the validation checks to see if its isNullOrEmpty. The validation works but what I am having difficulty is if the user never selects the textbox and clicks save, I want the validation to run again. I wa...
more »

2017-04-21 20:04 (0) Answers

Excel Drop-Down List to Take from Multiple Columns

I have been trying to figure this out for two hours now and I just need to ask for help. I am trying to have a drop down list in Excel that when you select an item, it will pull info from the columns next to it as well. SHEET 1 Name | City | State ...
more »

2017-04-21 18:04 (1) Answers

Ajax validation with custom id in yii2

I have a same field in foreach loop like below foreach ( $subCategoryData as $k => $val) { <?= $form->field($model, 'sub_category', ['template' => '{input}'])->textInput(['maxlength' => 255, 'class' => 'form-control require...
more »

2017-04-21 15:04 (0) Answers

Need to correct this form validation

I've this small form in which the 1st field(title) is required by default. The 2nd and the 3rd are required only in a specific condition. Case-I: If tool name is filled out, both tool name & tool URL become required. Case-II: If tool URL is fill...
more »

2017-04-20 15:04 (2) Answers

Getting error: unterminated string literal

How do I prevent new lines from being created in Firebase using data validation? The code below doesn't work, I get error unterminated string literal How do I remove the error? { "rules": { ".read": "auth != null", ".write": "auth != null"...
more »

2017-04-20 12:04 (0) Answers

How to handle validation of illegal argument

I know this problem has already been addressed on the site. Though, there are many different opinions and I'd like to understand it deeper to know how to face some particular situations. Let us say I have the following code. I will write in C#, thoug...
more »

2017-04-20 12:04 (1) Answers

how to get range of numbers in validation pattern

I want to validate numbers between 2009-2059 in validator pattern at typeScript code. I tried many ways but could not find a way to do it ? Could you please look at the sample code and tell me how to fix it ? Regards Alper you can see the sample c...
more »

2017-04-20 10:04 (1) Answers