Issue this one has been bugging me for a few weeks… I’m trying to write a formula in Cognos Analytics (costpoint) that returns if someone is hitting a new years of service milestone in the actual month. returning a simple
Continue readingTag: validation
What exactly is the error in my Validator class or the observable pipe that this error keeps occuring in my console?
Issue Errors keep appearing on my console after a while. Can anyone please tell me is it because of the flaky API? I am a beginner in Angular Async Validator Class: import { AsyncValidator, FormControl } from ‘@angular/forms’ import {
Continue readingAngular custom validator for hours input in HHH:MM format
Issue I need to validate input in hours and minutes but it is strange format of 6 characters in HHH:MM. For example 30hrs and 15 mins is needed to be entered in the input like 030:15 My attempt to create
Continue readingAngular async validator check unicity of input in database
Issue I have an <input> where the user enter a value that is supposed to be unique in database. I want to check dynamically in the front-end if that value is unique or not. I want also to display an
Continue readingAngular: Cyclic Dependency
Issue Why is currentdate in this.currentdate.getTime() coming back as undefined? newlisting = this.formBuilder.group({ availabledate: new FormGroup({ xyz: new FormControl() },[this.mainservice.getcurrenttime.bind(this)]) }) @Injectable({providedIn: ‘root’}) export class MainService { constructor(){} currentdate: Date = new Date(); getcurrenttime(control: FormGroup){ console.log(this.currentdate.getTime()) <~~ Generates Error!!! if(condition){
Continue readingPrimeNG calendar form group validation issue
Issue I’m trying to add validation to my form. discount field cannot be empty and value range needs to be within 0 to 100, time_from and time_to cannot be empty. I cannot fire validation proccess on time_from and time_to. I
Continue readingHow to enforce that one date is bigger than the other in angular reactive form?
Issue I’ve the following reactive form: newTripForm = this.formBuilder.group({ name: new FormControl(”, Validators.compose([Validators.required, Validators.minLength(3)])), startDate: new FormControl(”, Validators.required), endDate: new FormControl(”), }); How can I add a validator enforcing that the endDate is bigger than the startDate? Also, is there
Continue readingangular2 Validator Error: Template parse errors:(…)
Issue I have problem. In console i can see “Error: Template parse errors:(…)”. I’m use: “@angular/common”: “2.0.0-rc.6”, “@angular/compiler”: “2.0.0-rc.6”, “@angular/core”: “2.0.0-rc.6”, My form looks like <form name=”authForm” novalidate=”” ng-submit=”login()” class=”md-padding” [ngFormModel]=”form”> <div layout=”column” class=”layout-column”> <div class=”md-form” style=”margin-bottom: 64px; margin-top: 20px”>
Continue readingAngularJS date validation
Issue How can I do date control validation in an AngularJS form for the following code ? <label for=”startDate” class=”control-label”>Start Date:</label> <div class=””> <input type=”date” class=”form-control” id=”startDate” ng-model=”startDate” /> </div> <label for=”endDate” class=”control-label”>End Date:</label> <div class=””> <input type=”date” class=”form-control” id=”endDate”
Continue readingAngularJS date validation
Issue How can I do date control validation in an AngularJS form for the following code ? <label for=”startDate” class=”control-label”>Start Date:</label> <div class=””> <input type=”date” class=”form-control” id=”startDate” ng-model=”startDate” /> </div> <label for=”endDate” class=”control-label”>End Date:</label> <div class=””> <input type=”date” class=”form-control” id=”endDate”
Continue readingExpressionChangedAfterItHasBeenCheckedError when add validator in ngOnInit
Issue I am trying to add a custom validator to an input, but when I do so it triggers an ExpressionChangedAfterItHasBeenCheckedError error saying something changed from TRUE to FALSE. I traced the problem down to the line below: ngOnInit(): void
Continue readingBatch File input validation – Make sure user entered an integer
Issue I’m experimenting with a Windows batch file to perform a simple operation which requires the user to enter a non-negative integer. I’m using simple batch-file techniques to get user input: @ECHO OFF SET /P UserInput=Please Enter a Number: The
Continue readingETags: Validation and Cache max-age
Issue I have been using ETags for a good while now and I am pleased with how they can be used and what they allow to be done. However, I am sometimes experiencing ETag validation requests. On my server, I
Continue readingcustom validation with array in loopback
Issue Does anyone know how to do custom validation on array of sub model in loopback.js? “properties”: { “rows”: { “type”: [ “sub-model” ], “required”: true } } Solution In model.js you need to add below : function rowsValidation(err){ if(!this.rows){
Continue readingStrongloop loopback validation and request lifecycle
Issue I want to update a model before it’s saved to the database, after validation has occurred. What is the correct point in the loopback request lifecycle (uh oh, this is starting to remind me of .NET webforms!) to do
Continue readingLoopback : Validate model from another model is not returning proper error message
Issue I am validating model from another model like below Model.addFavorite = function (data, callbackFn) { if (data) { var faviroteModel = this.app.models.Favorite; var objFavorite = new faviroteModel(data); objFavorite.isValid(function (isValid) { if (isValid) { callbackFn(null, objFavorite); } else { callbackFn(objFavorite.errors);
Continue readingAngularJS custom validation against a resource
Issue I have an angular form which performs custom validation of all fields, anytime any form field changes. The validity of each value can change, based on the value of other values in the form, hence the validation of the
Continue readingSelf Organizing Map to split datasets
Issue I am trying to use Self Organizing Map to split datasets into training, validation and test sets. I created the SOM model, dimension1 = 10; dimension2 = 10; net = selforgmap([dimension1 dimension2],100,3,’hextop’,’linkdist’); [net, tr] = train(net, cancer); however when
Continue readingDistribution of the Training Data vs Distribution of the Test/Prediction
Issue Does the Distribution represented by the training data need to reflect the distribution of the test data and the data that you predict on? Can I measure the quality of the training data by looking at the distribution of
Continue readingHow to create a test and train dataset in R by specifying the range in the data set instead of using set.seed() function and probability?
Issue I am a noob at programming, sorry if this is a silly question. My supervisor doesn’t seem to trust set.seed() function in r as every number will yield a different output (with different test and train sets). Thus she
Continue readingcuda out of memory during training
Issue I am using Pytorch to do a cat-dog classification. I keep getting a Cuda out of memory problem during training and validation. If I only run the training, I don’t have this issue. But when I add a valiation
Continue readingAngularjs validation issue for password field
Issue Here is my angularjs code for the password field : <input type=”password” class=”form-control” name=”password” ng-model=”signup.registerPassword” ng-minlength=”8″ > <small class=”errorMessage” data-ng-show=”signupForm.registerPassword.$dirty && signupForm.registerPassword.$error.minlength”> Minimum 8 characters.</small> <small class=”errorMessage” data-ng-show=”signupForm.registerPassword.$dirty && signupForm.registerPassword.$error.required”> Enter password again.</small> when I type the password below
Continue readinghow to hide value of input element if its $pristine
Issue I have ng-model attached to , but i want to display a default placeholder value if it’s not been touched ($pristine). Is there any good way to do it? I cannot simply set my ng-model value to null during
Continue readingng-pattern doesn't show $error.pattern
Issue I have script here and ng-pattern works correctly because scope.subnet is shown in Output only after input matches pattern. But ng-show doesn’t display any error if ng-pattern is not matched <body ng-contoller=”myConfigGenCtr”> <form novalidate name=”myForm”> <div class=”form-group”> <label for=”hostname”>Firewall
Continue readingHow to validate forms in Angular JS
Issue i’m a newbie in angular JS. and i was trying the input type=”text”, i’m retrieving my name from my controller and i was using $dirty and $invalid to validate my data but it isn’t showing when i make the
Continue readingAngular Form Validation On Dynamically Added And Removed Form Fields In Angular 1.5.7
Issue So I have read a few posts on this topic and haven’t quite figured it out. I tried to implement the solution found at https://scotch.io/tutorials/building-dynamic-angular-forms-with-ngrepeat-and-ngform but had no success. the validation does add the ng-invalid class to the element
Continue readingHow to cancel debounce in ng-model-options in AngularJS
Issue <form name=”editForm”> Title<input ng-model=”task.title” type=”text” name=taskTitle ng-model-options=”{ updateOn: ‘default’ ,debounce{‘default’:2000000} }”> <a ng-click=”UpdateTask(task.title)”>SAVE</a> <a ng-click=”editForm.$rollbackViewValue();”>DISCARD</a> </form> Since the debounce value is very long, when I click “DISCARD”, the ng-model will not reflect its changes. However, what I want is
Continue readingng-minlength Angular Form Validation
Issue Angular seems to not be raising minLength or maxLength error in the below code… the required error (as well as the email error) is working however. I know ng-minlength and ng-maxlength is working because the input box is changing
Continue readingMy AngularJS validation does not work. I have added ng-required
Issue My AngularJS validation does not work. I have added ng-required. Please let me know where I am missing <ng-form id=”frmdisbursementScheduleMaintenance”> <div style=”padding-bottom: 8px;”> <button id=”cm-SaveBtn” name=”cm-SaveBtn” type=”button” ng-click=”submitted=true”>Save</button> <button id=”cm-RefreshBtn” name=”cm-RefreshBtn” type=”button”>Refresh</button> </div> <div> <table> <tr> <td><span class=”VNAVLabel”>Process Begin
Continue readingMy AngularJS validation does not work. I have added ng-required
Issue My AngularJS validation does not work. I have added ng-required. Please let me know where I am missing <ng-form id=”frmdisbursementScheduleMaintenance”> <div style=”padding-bottom: 8px;”> <button id=”cm-SaveBtn” name=”cm-SaveBtn” type=”button” ng-click=”submitted=true”>Save</button> <button id=”cm-RefreshBtn” name=”cm-RefreshBtn” type=”button”>Refresh</button> </div> <div> <table> <tr> <td><span class=”VNAVLabel”>Process Begin
Continue readingAngular validators and ng-maxlength use
Issue I’ve got the following div, which I want to add the bootstrap’s class “has-error” if the input length is over 50 characters. This is the HTML: <div class=”form-group” ng-class=”{has-error:[formData.titulo.$error]}”> <label for=”inputTitulo”>Título</label> <input type=”titulo” class=”form-control” id=”inputTitulo” maxlength=”50″ ng-maxlength=”50″ ng-model=”formData.titulo”> </div>
Continue readingAngular form is $valid when all inputs are blank, why?
Issue My form is showing up as valid even though all of my input fields are blank. I have the required keyword in the input fields. <!DOCTYPE html> <html ng-app=”myApp”> <head> <link rel=”stylesheet” href=”https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/css/materialize.min.css”> <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js”></script> <script type=”text/javascript” src=”/components/angular/angular.min.js”></script> <script
Continue readingHow to add validations for div tags in AngularJS
Issue I’m trying to add validations to my Angular js code. I’m using div tags instead of form. Do I need to change something in .js or should I just add required in my input tag <input required type=”…” name=”…”
Continue readingHide error message on text focus in angularjs
Issue I am beginner of angularjs. I just started on form validation. All is went right until i tried to hide the error message on input focus. When i am hitting submit button it shows error message. After i focus
Continue readingHow to display error message when passwords doesn't match in Angularjs?
Issue I’m new at Angularjs and my question is how to display an error message when the password doesn’t match with confirm password? Can someone help me, this is not very difficult but I’m still learning to programme. Thanks to
Continue readingHow to invoke AngularJS $compile from outside AngularJS module/code?
Issue Suppose I have HTML with AngularJS module/controller as follows: angular .module("myModule", []) .controller("myController", [‘$scope’, ‘$compile’, function ($scope, $compile) { $scope.txt = "<b>SampleTxt</b>"; $scope.submit = function () { var html = $compile($scope.txt)($scope); angular.element(document.getElementById("display")).append(html); } }]); <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <body ng-app="myModule" >
Continue readingShow validation error for Radio Boxes if there is none checked when clicking Submit in Angular
Issue In this example i want to get the Hint “Die Angabe eines Geschlechtes ist erforderlich” if the submit button is clicked and no gender is chosen. How can i reach this with the button? I thought i could change
Continue readingAngular 9 FormArray Conditional Validation – subscribe issue
Issue I’m having trouble with being able to subscribe to valueChanges of a form that uses FormArray inside of FormGroup. Essentially, I need to know the value of one input as that changes the validation rules of another. Below is
Continue readingvalidate input with name containing brackets in AngularJS
Issue I have a form input with names containing brackets, e.g.: <form name=”my_form”> <input type=”text” name=”my_form[email]” ng-model=”email” ng-class=”‘mycssclass’: my_form.my_form[email].$invalid”> </form> So, the problem is that Angular is not applying that css class because of the name of my input (my_form[email]),
Continue readingng-class ($valid) within ng-repeat does not work on dynamically loaded forms via ng-include
Issue $valid does not work on dynamically loaded forms via ng-include or I do a mistake (I can’t change the style of the Box on form validation): Here is the plunker: http://plnkr.co/edit/WA5ohXoMrb5QcUdl0uwe?p=preview If the text input field is filled, the
Continue readingInput type number in AngularJS
Issue I have a input type number in AngularJS as follows… <input type=”number”></input> I want to achieve the following: If user enters a positive value, it should display the same font and color If the user displays a negative value,
Continue readingChanging class combinations based on multiple conditions
Issue I have few style classes defined in my style sheet as like the following: .left-align{ /* some styles here */ } .right-align{ /* some styles here */ } .validate-error{ /* some styles here */ } Based on the type
Continue readingRequire two words in textbox, with AngularJS
Issue I really struggling with this. I need to force the user to write the first and last name, in only one textbox. I using AngularJS, and I want to validate text field using ng-pattern. The field should accept all
Continue readingRegex acts weird
Issue I want to create a regex expression that I can pass to ng-pattern so that the input can only be valid if the string has only uppercase/lowercase latin letters from a to z, n with tilde, and vowels with
Continue readingHow to use ng-pattern to limit 10 number inputs separated by commas
Issue I want to enter in up to 10, 8 character length numbers in one text field all separated by commas. For example, 12345678,12345678,12345678,12345678….. The only thing is the numbers can only be 8 characters at max and only up
Continue readingregex for multiple IPs comma separated with or without subnet
Issue I have regex for IPv4 address: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$ and i have regex for IPv4 CIDR range : ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|[1-2][0-9]|3[0-2]))$ the issue is how should i repeat it using comma separated pattern: XXX.XXX.XXX.XXX, XXX.XXX.XXX.XXX/XX, XX.XX.XX.XX, XX.XX.XX.XX/X , XX.XX.XX.X test data– 123.123.13.11, 1.0.0.0,
Continue readingHow to add password validation using regular expression in angularjs according to certain criterion?
Issue I want to validate password entered by user for following criteria : Password should be at least 8 characters long and should contain one number,one character and one special character. For it I used following regular expression : ^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$
Continue readingHow to disable header validation when using ReactorClientHttpConnector
Issue I use WebClient with ReactorClientHttpConnector in this configuration: public WebClient webClient() { HttpClient httpClient = HttpClient.create(); return WebClient.builder() .clientConnector(new ReactorClientHttpConnector(httpClient)) .build(); } In this configuration, all headers of a request pass validation for forbidden characters such \u0000 The problem
Continue readingHow to do form validation across multiple tabs that validate with FormGroup
Issue I’m developing an Angular2 workflow app that collects data on multiple tabs, customizing the fields on each tab based on prior tabs’ values, and then validating that all tabs are filled out correctly along the way. I’m using the
Continue readingallow to accept multiple validator patterns in angular material 2
Issue I’m trying to use md-error in angular material to validate user inputs from client side. So in my case I’m trying to validate an input field that accept two types of patterns. Regular Expression 1 : Accept first 9
Continue readingVariables in if condition scope
Issue There’s not much about this argument on this community so I thought to drop this question. I have this piece of code used for validating $params[‘full_name’]: $params = [“full_name”=>”John Doe”]; $full_name = $flag ? null : ( ( $tmp_name
Continue readingjquery validation is not working with templates inside ng view
Issue Simply I’m using JQuery validation to validate this simple form <form id=”getting-started-form”> <label>Name</label> <input type=”text” id=”txt-name” name=”name” /> <br /> <label>Email</label> <input type=”text” id=”txt-email” name=”email” /> <button type=”submit”>Validate</button> </form> the validation works fine if this form is not is
Continue readingAngular simple validation not working
Issue Here is some plunker I have created. I cant understand why it is not working. Here is the JS: angular.module(‘demo’, [ ]).controller(‘MainCtrl’, function($scope) { $scope.name = “Vlad”; $scope.age = 11; $scope.sendTest = function() { console.log($scope.name.$valid); console.log($scope.age.$valid); } }); Here
Continue readingAngular setValidity not working when HTML is produced in a Directive
Issue I have dynamic html that i make in a directive, and it includes an input element with validation. Example HTML produced with error message: <input id=”bob” class=”personCheckbox” name=”bob” type=”checkbox” value=”bob” ng-model=”foobar” validate-foo/> <span style=”color:red” ng-show=”myForm.bob.$error.summary”>Need Summary</span> <input type=”text” name=”summary-bob”
Continue readingWhat is the correct way to validate all form fields on submit when using ng-repeat for dynamic form?
Issue I have a form with some fields (build with ng-repeat, so I dont know how much). I added to the submit button ng-disabled=form.field.$invalid and added to all the fields “required” but the ng-disabled work just for this last field.
Continue readingAngularJS password confirmation noMatch working but form is $invalid?
Issue I am using this code to make password input and confirm password input to match correctly Javascript: var app = angular.module(‘app’, []); app.directive(‘validPasswordC’, function() { return { require: ‘ngModel’, scope: { reference: ‘=validPasswordC’ }, link: function(scope, elm, attrs, ctrl)
Continue readinghow to validate input in angularJS before the button press to add item in html table
Issue How to validate the input elements before performing any operation, I have four html input element and html table when you click item on add to list it added item in HTML table now my problem is validation, I
Continue readingAngularJS form input name validation not working in ngrepeat
Issue name=”number-{{$index+1}}” working in ng-repeat at the same time myform.number-{{$index+1}}.$invalid does not working for the form Demo: http://plnkr.co/edit/Z3EmpHu8w2iZcZko9dJv?p=preview var app = angular.module(‘plunker’, []); app.controller(‘MainCtrl’, function($scope) { $scope.choices = [{no: ‘1234567890’}, {no: ‘0987654321’}]; $scope.numberAdd = function() { $scope.choices.push({‘no’:”}); }; $scope.numberRemove =
Continue readingHide error labels shown with angularjs form validation after some time
Issue I am using angularjs form validation for client side validation. I need to hide the labels which displaying with angularjs error form validation method, after 3 seconds, after message appear. Html will look like this, <form name=”userForm” novalidate> <div
Continue readingangularjs form validation that has an internal form
Issue I have a form by some input. and some time I have another form by some input into this form. when I have not internal form, my parent form is valid, but when I have internal in original form
Continue readingAngular validation on submit
Issue I am trying to create a form that, if you do not fill out any of the fields, will show an alert message if you hit submit. I am trying to work with angular validation to make this happen;
Continue readingAngularJS form validation issues
Issue I am trying to do a simple form validation using angular js. But it doesnt seems to work and I am not getting what I am missing. HTML <form role=”form” class=”ng-pristine ng-valid” name=”registerForm”> <fieldset> <div class=”form-group”> <input class=”form-control” placeholder=”First
Continue readingwhy the `test process` is inside the epoch loop in deep learning?
Issue I am new to deep learning, here is the code I saw The code is fine, but I don’t understand the follow: for epoch in range(1, args.epochs + 1): train(epoch) test(epoch) with torch.no_grad(): sample = torch.randn(64, 20).to(device) sample =
Continue readingThe train and validation accuracy of image classification with single class data are wrong and want to fix this
Issue I have built an image classification program using 32 images for train and 16 images for validation with batch size of 16 and 10 epochs. I have used ImageDataGenerator(rescale=1./255).flow_from_directory(image path and other parameters) for train and validation images. I
Continue readinghow to plot training error and validation error vs number of epochs?
Issue how to plot training error and validation error vs number of epochs? train_data = generate_arrays_for_training(indexPat, filesPath, end=75) validation_data=generate_arrays_for_training(indexPat, filesPath, start=75) model.fit_generator(generate_arrays_for_training(indexPat, filesPath, end=75), #end=75),#It take the first 75% validation_data=generate_arrays_for_training(indexPat, filesPath, start=75),#start=75), #It take the last 25% #steps_per_epoch=10000, epochs=10) steps_per_epoch=int((len(filesPath)-int(len(filesPath)/100*25))),#*25),
Continue reading80-20 or 80-10-10 for training machine learning models?
Issue I have a very basic question. 1) When is it recommended to hold part of the data for validation and when is it unnecessary? For example, when can we say it is better to have 80% training, 10% validating
Continue readingValidation loss and training loss curve , is that acceptable?
Issue I applying epilepsy seizure prediction using CNN. This is a plot for validation loss and training loss. I don’t know whether this curve is acceptable or not. Any help would be appreciated Solution Yes it’s acceptable as long as
Continue readingKeras ImageDataGenerator validation split not selected from shuffled dataset
Issue How can I randomly split my image dataset into training and validation datesets? More specifically, the validation_split argument in Keras ImageDataGenerator function is not randomly splitting my images into training and validation but is slicing the validation sample from
Continue readingWeird behaviour for my CNN validation accuracy and loss function during training phase
Issue Here is the architecture of my network : cnn3 = Sequential() cnn3.add(Conv2D(32, kernel_size=(3, 3), activation=’relu’, input_shape=input_shape)) cnn3.add(MaxPooling2D((2, 2))) cnn3.add(Dropout(0.25)) cnn3.add(Conv2D(64, kernel_size=(3, 3), activation=’relu’)) cnn3.add(MaxPooling2D(pool_size=(2, 2))) cnn3.add(Dropout(0.25)) cnn3.add(Conv2D(128, kernel_size=(3, 3), activation=’relu’)) cnn3.add(Dropout(0.2)) cnn3.add(Flatten()) cnn3.add(Dense(128, activation=’relu’)) cnn3.add(Dropout(0.4)) # 0.3 cnn3.add(Dense(4, activation=’softmax’))
Continue readingWhy does a 50-50 train/test split work best for a data-set of 178 observations with this neural network?
Issue From what I’ve read, it appears that a split of around 80% training 20% va validation data is close to optimal. As the size of the testing dataset increases, the variance of the validation results should go down at
Continue readingWhat is validation data used for in a Keras Sequential model?
Issue My question is simple, what is the validation data passed to model.fit in a Sequential model used for? And, does it affect how the model is trained (normally a validation set is used, for example, to choose hyper-parameters in
Continue readingK-fold Cross-Validation – initialise network after each fold or not?
Issue I mostly understand how k-fold cross-validation works and have begun implementing it into my MATLAB scripts, however I have two questions. When using it to select network features (hidden units, weight decay prior and no. iterations in my case).
Continue readingTensorflow Image classification get train_images/train_X and train_labels/train_y
Issue I’m working on a tensorflow model for identifying different butterfies. I’m using Neural networks for this and I’m reading images from folders and all the data gets split in a train dataset and validation dataset, but I want split
Continue readingWhy do my train_generator and val_generator produce the same picture?
Issue I set aside a validation split like below: val_samples = 60 train_imgs = coco_imgs[:-val_samples] train_masks = coco_masks[:-val_samples] val_imgs = coco_imgs[-val_samples:] val_masks = coco_masks[-val_samples:] My train_imgs and val_imgs show different pictures: fig, ax = plt.subplots(ncols =2, figsize = (10,3), sharex
Continue readingHow to incorporate the validation set in machine learning?
Issue I am trying to learn about machine learning, and I am having trouble understanding when and how to use the validation set. I have understood that it is used to evaluate the candidate models, before checking with the test
Continue readingdisabled property of button binding not working angular 4
Issue Im curious on my syntax. By the documentation and examples I have found online, the button in my form should be disabled if my form is not valid. However the buttons disabled property is not affected by my form
Continue readingJavascript limit input to specific numbers
Issue I wanted to create an input field for a postal code check, i found number ranges to not work, as they arent all sequential: In Dresden one postal code is 01157 but the next one is 01169, so a
Continue readinghow to validate range of numbers in RAML(half-open interval)
Issue I defined a raml file. I want to valid a queryParameter(coefficient) that greater than 0 and less than or equal to 1. (0< coefficient ≦ 1 ) Here is my raml. #%RAML 1.0 title: sample API baseUri: http://localhost:8081/api version:
Continue readingRuby on Rails I18n interpolation
Issue everyone! I have a small validation for my :username field, which should be from 4 to 30 characters. I wrote a validation: :length => { :within => 4..30, :message => I18n.t(‘activerecord.errors.range’) – I wanted to display a single error
Continue readingCannot read properties of undefined (reading '0') – ( empty error JSON response with postman)
Issue so i’m working with Joi for validation, and i’ve encountered this error when trying to post with postman. i’m follwing a tutorial, i tried to write it differently, but still have the same issue. i’m trying to access the
Continue readingMongoose Model Custom Error Message for Enums
Issue I would like to customize the validation messages that my Mongoose Models produce. I tend to NOT put my validations (e.g. required) on the schema object directly because there is no freedom to have custom error messages. e.g. sourceAccountId:
Continue readingWhen using a custom validator, formBuilder.group is displayed as deprecated
Issue I have built my PasswordValidator as follows: // Function to compare password with confirmPassword export function ConfirmedValidator(controlName: string, matchingControlName: string) { return (formGroup: FormGroup) => { const control = formGroup.controls[controlName]; const matchingControl = formGroup.controls[matchingControlName]; if (matchingControl.errors && !matchingControl.errors.confirmedValidator) {
Continue readingHow to go about understanding the type `new (…args: any[]) => any`
Issue I’m reading through the code of the class-validator library and it has the following isInstance method in it: /** * Checks if the value is an instance of the specified object. */ isInstance(object: any, targetTypeConstructor: new (…args: any[]) =>
Continue readingHow to display message in HTML Tag with PHP in a function
Issue I have this PHP form validator that is also hooked up to a mail function and to keep things organized I did the form validation in a separate function that is being called when the form is submitted. Now
Continue readingHow to add validation in nested form array?
Issue I have a problem on validation on calculation. The total quota should be sum of each quota. However, this total quota should be input by user (not calculation). If all quota are sum and also not same value as
Continue readingProblem on validation in form array in angular
Issue I have a problem on validation in form array. I have a assignment for validate the sum of subQuota(formarray) should be equal to total quota. The validation is correct when the page is ngOnInit (subquota : 13,3,4 && totalquota:
Continue readingHow to add debounce time to an async validator in angular 2?
Issue This is my Async Validator it doesn’t have a debounce time, how can I add it? static emailExist(_signupService:SignupService) { return (control:Control) => { return new Promise((resolve, reject) => { _signupService.checkEmail(control.value) .subscribe( data => { if (data.response.available == true) {
Continue readingCan I use a div inside a list item?
Issue Why is the following code valid when I am using a <div> inside a <li>? <ul> <li class=”aschild”> <div class=”nav”>Test</div> </li> </ul> Solution Yes you can use a div inside a li and it will validate. <!ELEMENT li %Flow;>
Continue readingHow to show setCustomValidity message/tooltip without submit event
Issue I’m using forms basic validation to check if email is correct format, then the data is sent by Ajax where it checks if email address is already in use and did the user select country/state or left default values
Continue readingShow errors in JavaScript in HTML5 form
Issue I have a HTML5 form with required fields: <form id=”my_form”> <input type=”text” name=”myfield1″ required> <input type=”text” name=”myfield2″ required> <input type=”text” name=”myfield3″ required> <button type=”button” id=”my_button”>Check</button> </form> Also, I have the following jQuery code: $(‘#my_button’).on(‘click’, function() { if ($(‘#my_form’).checkValidity() ==
Continue readingOptional field validation in Yup schema
Issue I’m using react-hook-form with yup for my form validation and want some fields to be optional (null). Following their documentation, I’m using nullable() and optional() but it is still getting validated: export const updateAddressSchema = yup.object({ address: yup .string()
Continue readingValidator says I have a bad value for attribute sizes on element img
Issue i am unable to validate my image elements and unable to find the reason. The sizes element works as expected, Chrome loads the correct image. The W3C-Validator says the following: Bad value (max-width:768px)100vw, (min-width: 768px)45vw for attribute sizes on
Continue readingHow to fix consecutive hyphens did not terminate a comment error?
Issue with the w3 validator (https://validator.w3.org) scan my project but that’s found a error. Error: Consecutive hyphens did not terminate a comment. — is not permitted inside a comment, but e.g. – – is. At line 135, column 8 ↩
Continue readingHow to validate a letter and whitespace only input via JavaScript regular expression
Issue I have an input type=”text” for names in my HTML code. I need to make sure that it is a string with letters from ‘a’ to ‘z’ and ‘A’ to ‘Z’ only, along with space(s). This is my HTML
Continue readingPassword validation for special characters in javascript
Issue I am writing a code for password validation that contains atleast: one small alphabet one capital alphabet one digit one special character min 8 and max 12 characters but not able to validate the special character, rest all conditions
Continue readingIs there a way to update VS' CSS validation to 3.0?
Issue I’m getting warnings about CSS3.0 properties like text-overflow. Is there a way to validate against 3.0? HTML5 and CSS3 support is coming to VS2010 in SP1. Link And now its here. http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210/view/Reviews/0?showReviewForm=True Solution Apparently, you can define your own
Continue readingAngular 4 Form Validators – minLength & maxLength does not work on field type number
Issue I am trying to develop a contact form, I want user to enter phone number values between length 10-12. Notably same validation is working on Message field, Its only number field which is giving me trouble. I found this
Continue readingAngular 13 Reactive Form Validation Parser Error: Unexpected token [, expected identifier or keyword
Issue I’m Trying Angular Form Validation with Reactive form. I can’t resolve an error I’m facing, can anyone help, please? My Code Snippet is attached below, HTML: <form [formGroup]="voucherDetailsForm"> <div class="d-flex mt-1 form-group"> <label class="col-md-5 col-form-label"> Project: </label> <ng-select class="col-md-7"
Continue readingenable or disable field. Reactive Form Angular
Issue I tried to enable and disabled the repassword field in a **Reactive form ** with [angular version:13] when the password field is valid. I solved it with a technique I dont like it. [HTML] <input formControlName="password" (change)="enableOrDisablePassword()" type="text" >
Continue readingForm validation – Must contain a specific word from a list
Issue I’m trying to use Javascript to validate an input field to have the specific formatting below: "WORD1,WORD2" So there has to be a comma in between two words, no spaces. WORD1 can be any word, but WORD2 has to
Continue reading