Hi sir, while trying the above code getting the syntax error like below line: 2 Syntax error on token "(", ; expected Syntax error on token ")", ; expected Compile failed.
Even if we are giving empty string and submitting the form , the form is submitting without any error, it is not showing false . How to validate it without giving required mark
// Regex to check valid Aadhaar number String regex= "^[2-9]{1}[0-9]{3}\\s[0-9]{4}\\s[0-9](4)$"; // Compile the ReGex java.util.regex.Pattern p=java.util.regex.Pattern.compile(regex); // If the string is empty, return false if (theValue == null || theValue.trim().equals("")) return false; // Pattern class contains matcher() method to match the given string and the regular expression java.util.regex.Matcher m = p.matcher(theValue); // Return if the string matched the ReGex return m.matches();
Hi sir, while trying the above code getting the syntax error like below
line: 2
Syntax error on token "(", ; expected
Syntax error on token ")", ; expected
Compile failed.
Check
Java code if you missing any semicolon properly
Great content sir ❤️ keep posting for us
R u giving training
Hi sir the code you have used is not taking spaces it is taking commas I'm using it for credit card number validation
Ok
Can you specify another approach for accepting 16 digit card number
Hi Sir
How did you changed that error message (Invalid valid specified for Aadhaar card)
did u get that
Even if we are giving empty string and submitting the form , the form is submitting without any error, it is not showing false . How to validate it without giving required mark
Add another condition that pandcard is empty throw the error
@@pegabytes How to embed
chatbot in our casetype
I think find this in pega docs
can you share code please?
brother ,
please share that java code.......for aadhar and pan card.
// Regex to check valid Aadhaar number
String regex= "^[2-9]{1}[0-9]{3}\\s[0-9]{4}\\s[0-9](4)$";
// Compile the ReGex
java.util.regex.Pattern p=java.util.regex.Pattern.compile(regex);
// If the string is empty, return false
if (theValue == null || theValue.trim().equals("")) return false;
// Pattern class contains matcher() method to match the given string and the regular expression
java.util.regex.Matcher m = p.matcher(theValue);
// Return if the string matched the ReGex
return m.matches();
hi very clear explanation...
but may i know wr u find java regex code please
@@pegabytes in vch site its available
yeah in pdn its available thanks
bro code antha add chesanu but space kodthunte gap ravatledhu anna
@@pegabytes I will try bro..keep posting the videos bro..
Got it bro..Thank you
Hi sir,
In the Regex pattern what is the use of $ in the last?
@@pegabytes but in other validation code $ is not there at the end.
Anna koncham a codes ne share chai anna ALAgay password ki kuda edit validate rai anna , present avarevi videos layvu vati medha
Bro can I have your mail i'd please
@@pegabytes tq u