Question

standard on a numeric field

Hello Everyone ! 

I would like to know if there's a way to check standard on a numeric field  of an ID.

I would like to check the correctness of the input received by the user, no need to verify the validity of the id.

 

The required device is written In JAVASCRIPT:

 

Like 0

Like

1 comments

Hello,

 

Here is the example of checking if the string contains Guids:

The code is:

function checkIfValidGuid(id) {
    var valueToCheck = id.trim();
    return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(valueToCheck);
}

It's better use regular expressions in case you need to check if the input fits the conditions. Please also note that this is the general Java Script question not related to development in the Creatio platform so it's better to ask such questions in forums like Stack Overflow.

Show all comments