Compare input text with person name belongs to only one input number id

input type=number
html input
input> tag attributes
input type textarea
input type select
html input placeholder
input name
html form

Im trying to write a validation for 2 groups of fields. I have 6 inputs, 3 for text name and 3 more for id number... the validation should do this "if input name="RE_SignedByID" has an input type name="RE_SignedByName", then other inputs name="RE_SignedByID", should NOT contain the same name="RE_SignedByName" More easy explanation... one ID number should have only one Person Name (Id number is unique for one person name). What can I use for that? Should I map() all the inputs? Those are my inputs:

<div id="signedBy" class="clearfix">
    <label>Signer, person ID & name</label>
    <span id="signedByID" class="ids half">
        <input type="text" name="RE_SignedByID" placeholder="personID, person1" data-validate="" tabindex="101" required>
        <input type="text" name="RE_SignedByID" placeholder="personID, person2" data-validate="" tabindex="103">
        <input type="text" name="RE_SignedByID" placeholder="personID, person3" data-validate="" tabindex="105">
    <span class="names half">
        <input type="text" name="RE_SignedByName" placeholder="name, person1" tabindex="102" required>
        <input type="text" name="RE_SignedByName" placeholder="name, person2" tabindex="104">
        <input type="text" name="RE_SignedByName" placeholder="name, person3" tabindex="106">

I guess it should also be an "on change" function? or can I make the validation on click? Some ideas...? Im actually compleatley lost here... Thanks in advance!!!

Maybe use different class names for all 3 of them to make them unique?

<input class="name1">
<input class="name2">
<input class="name3">

I'm not sure what you mean but if you want to make the input types unique and not call them all when you write class="names half", then you should give them all unique class names.

HTML 5.2: 4.10. Forms, Radio buttons also use the input element, this time with a type The textarea element can be used to provide a free-form text field. a telephone number in the international format or just the local format, and so forth. If candidate has an id attribute, add an entry to sourced names with that id attribute's� Python input() function always convert the user input into a string. but how to check user input is a number. We can Convert string input to int or float type to check string input is an integer type. also using isdigit() method of string class we can check input string is number or string.

So from my understanding you don't want multiple fields to have the same value. My approach would be this:

let inputTimeout = null; //set an empty timeout object
let vars = [null, null, null, null]; // create an array containing as many nulls as you have inputs
$('.nameInput').on('keyup', function(){
    let self = $(this);
    clearTimeout(inputTimeout); //clear the timeout
    inputTimeout = setTimeout(function(){ //set a timeout to check whether there is a dupe after the user has stopped typing
        if (vars.indexOf(self.val()) == -1){ //check if the vals array contains the newly entered string
            vars[self.attr('data-inputnum')] = self.val(); //insert the value into the array
            //handle duplicates here
    }, 500); //500ms is a sensible value for end of user input, change it if users complain that your app is too fast/slow

You then just have to edit your HTML a bit so that all name inputs have a class in common (i used .nameInput) and have a data-inputnum attr. This would look something like this:

<input type="text" name="RE_SignedByName" placeholder="name, person1" tabindex="102" class='nameInput' data-whichinput='0'/>
<input type="text" name="RE_SignedByName" placeholder="name, person2" tabindex="103" class='nameInput' data-whichinput='1'/>
<!--and so on-->

Of course, never rely on JavaScript verification alone, always also check inside your backend. However this would be out of scope for this answer.

<input type="text">, input elements of type text create basic single-line text fields. <input type="text" id="name" name="name" required. 4. minlength="4" maxlength, The maximum number of characters the input should accept. minlength, The Constraint validation is only applied when the value is changed by the user. Check for Numbers: User entered number in the text field where number is required, say in a Contact field. Check for Alphabets: Has the user entered characters in alphabets, say in name field. Check for Numbers and Letters: If a text input is all alphanumeric characters (numbers and letters), say in a message field

Hi Thanks all for the help, made me realize a couple of things till I got the answer. This is my working code:

var valSignedID = $("[name=SignedByID]").map(function() {
            return this.value.trim();

 var valOwnersID = $("[name=OwnersID]").map(function() {
            return this.value.trim();


for (var i = 0; i < valSignedID.length - 1; i++) {
        if (valSignedID[i] == valSignedID[i + 1] && valSignedID[i] != "") {
            alert(" You can not have duplicated signers ID's");
                return false;
            //  break;
for (var i = 0; i < valSingedName.length; i++) {
        if (valSingedName[i] == valSingedName[i + 1] && valSingedName[i] != "")         {
            alert(valSingedName[i] + " should not have different ID");
            //return false;

<input>: The Input (Form Input) element, <input type="text" id="name" name="name" required. 4 Looks like a text input, but has validation parameters and relevant keyboard in supporting range, A control for entering a number whose exact value is not important. Warning: Automatically focusing a form control can confuse visually-impaired people using � The step Attribute. The input step attribute specifies the legal number intervals for an input field.. Example: if step="3", legal numbers could be -3, 0, 3, 6, etc. Tip: This attribute can be used together with the max and min attributes to create a range of legal values.

[PDF] Fuzzy Matching using the COMPGED Function, Sometimes data about the same person, business, or other entity is available from multiple SAS has a number of functions designed to compare text strings and the input data set increases, the number of observations in the output data set the reverse order (B:A) by only comparing text strings when the id in the first � Implementing User Input in C# Programming . Most programs don't just run and perform a function without any type of user input. User input is any click command, text from a keyboard, or entry in a form. In almost any program, you need to handle user input.

Built-in Components - Components, <label for="site">Ember Question</label> <input id="site" type="text" to label an input element with a string that is not visually rendered, but still available to Name</label> <Input @value={{mut (get this.person this.field)}} id="firstname" />. The -- in front of the LEFT function is a trick we need to play on Excel to force it to treat the result from the LEFT function as a number rather than a text value. It does this by turning it into a negative number then back again (that's what the -- does). The only way Excel can do this is convert the text value into a number.

Input parser for functions - MATLAB, The inputParser object enables you to manage inputs to a function by creating an for required arguments, optional arguments, and name-value pair arguments. the width input argument and accepts a variable number of additional inputs. Create a function that parses information about people and, if parsing passes,� Definition and Usage. The map() method creates a new array with the results of calling a function for every array element.. The map() method calls the provided function once for each element in an array, in order.

  • it is not clear what you want to do
  • Looks like you want something like this:…