we have issue where we have an api which accepts only 10 digits. But in our SMS panel we have made to store the 12 digits.ex:910123456789 And now client side it's triggering an error saying where it accepts only 10 digits. So can i trim the first two numbers and send it through an api?
You can achieve it using a simple built in function in php (as your comment says you are using php) as below:
<?php
echo substr("910123456789",10);
//output will be 0123456789
?>
Ref: http://php.net/manual/en/function.substr.php
Related
I am using Angular14 with ibm carbon design system.
<ibm-number
[label]="label"
[helperText]="[helperText]"
[theme]="theme"
[min]="min"
[max]="max"
[step]="step"
[precision]="precision"
[invalid]="invalid"
[invalidText]="invalidText"
[warn]="warn"
[warnText]="warnText"
[size]="size"
[disabled]="disabled">
</ibm-number>
for eg: want to display a number as : 123,123,123
I would like to format the number with comma separated after 3 numbers. Couldnt find any documentation in ibm. Is there a way in angular with custom directives we can format this number input with comma separated?
Can anyone please help me with this to show how to achieve this?
Thanks
I'm trying to get data from my limesurvey and wonder why in API request I need to pass id: 1 as the third body parameter.
{method:'get_session_key',params:['myusername','mypassword'],id:1}
If I omit id or pass id:0, I will get the response data with an empty string. I can put any positive and negative integers there and I don't know exactly why it is required.
I'm following instructions on RemoteControl 2 API
That's the request id.
On the jsonRPCClient (component outside of LS) code it is fixed to 1.
I think it is part of a standard to use notifications, which are not used on LS API.
So, just fix it to 1 :)
I would like to know how I can filter to detect numbers (integers) only? e.g 1,2,....,10. Currently the api detects all formats of "text".
You should do that processing on your side. Use Regex to filter out numbers from string received from Vision API:
str="Text received 123,0";
number = str.replace(/\D/g,'');
result: 123
Google vision API will detect all character, google vision does not
have separate API(which can detect only number at the point of
scanning) for only numbers till now, But after scanning the image
using google vision api we will get the text in response example
"23XA3783", so now we can replace the character we don't want.
Store the google api response in temp variable
source_str = "23XA3783"
In my case I get the required string from google api response using
js
source_str= temp["responses"][0].textAnnotations[0].description
final_output = source_str.replace(/\D/g,'');
I am new to PHP
All I want to do is Mask Input the phone number
somehow it wouldn't allow Javascript or Jquery
$_SESSION["oh"]["phone"]=(empty($_SESSION["oh"]["phone"]))?$_COOKIE["phone"]:$_SESSION["oh"]["phone"];
Follow kind of patterns to mask the phone and to validate it
$pattern = "/^([1]-)?[0-9]{3}-[0-9]{3}-[0-9]{4}$/i"
Reference
AFAIK , we have used the mask() from jquery it helps to validate it
$("#phone").mask("(999) 999-9999");
Its handy to use it
Hi when I run the sample chat function provided by quickblox, it contains several built-in limitation for username registration, for example, I need to have a certain number of characters or type of characters in order to register. I'm wondering which files contain those registration and display of error messages (I only found a class called "errors" in SignUpViewController ) and how do I change those limitations?
There are 2 ways:
Sign Up & then Sign In with email
Sign Up & then Sign In with login - Login field should contain alphanumeric and punctuation characters only
Is it OK? Or you have problem with other User's field?