Glad you got it working.
regex will probably also do what you want and I'm sure you will learn about regex later.
Type: Posts; User: Norm
Glad you got it working.
regex will probably also do what you want and I'm sure you will learn about regex later.
Read the rest of post#12
Note:
= is the assignment operator
== is the equality tester
Please copy the full text of the error messages and paste it here.
Looks like you should read the API doc for the classes and methods you are using to see how to code them.
char values can be...
Ok, then a single if statement something like this:
if(firstCharIsOk && secondCharIsOk && continue with expressions to test each char to last char) {
// String is OK
}else {
// String has...
Does the specific char that is wrong need to be reported
or is it enough to say there is an error in the String?
How many if statements to use depends on the response to the above.
The code would look at each section of the String differently: 3 digits, one - and one letter
The validation might be done in a single if statement if the specific wrong char didn't need to be...
Are you looking for a regex
or can you code a loop or if to do the validation char by char?