473,388 Members | 1,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Java Validation

I wish to validate a string but i'm not quite sure how to go about doing it.

I'd like to ensure that it is 9 characters long and in the following format.

"LL 00 LLL" - Thats letter, letter, space, number, number, space, letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a string.

Any help greatly appreciated, including further reading from website.

Regards,
Dave
Jul 17 '05 #1
18 21396
Liz

"Dave W" <DaveWalker*SPAM*skydivers.co.uk> wrote in message
news:40***********************@news-text.dial.pipex.com...
I wish to validate a string but i'm not quite sure how to go about doing it.
I'd like to ensure that it is 9 characters long and in the following format.
"LL 00 LLL" - Thats letter, letter, space, number, number, space, letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a string.

Any help greatly appreciated, including further reading from website.

Regards,
Dave


String x = "LLL 00 LLL";

if ( x.length()==9
&& java.lang.Character.isLetter(x.charAt(0))
&& java.lang.Character.isLetter(x.charAt(1))
&& java.lang.Character.isLetter(x.charAt(2))
&& java.lang.Character.isSpace (x.charAt(3))
&& java.lang.Character.isDigit (x.charAt(4))
&& java.lang.Character.isDigit (x.charAt(5))
&& java.lang.Character.isSpace (x.charAt(6))
&& java.lang.Character.isLetter(x.charAt(7))
&& java.lang.Character.isLetter(x.charAt(8))
&& java.lang.Character.isLetter(x.charAt(9)))
{ // do something for match
}
else
{ // do something for not match
}
Jul 17 '05 #2

String x = "LLL 00 LLL";

if ( x.length()==9
&& java.lang.Character.isLetter(x.charAt(0))
&& java.lang.Character.isLetter(x.charAt(1))
&& java.lang.Character.isLetter(x.charAt(2))
&& java.lang.Character.isSpace (x.charAt(3))
&& java.lang.Character.isDigit (x.charAt(4))
&& java.lang.Character.isDigit (x.charAt(5))
&& java.lang.Character.isSpace (x.charAt(6))
&& java.lang.Character.isLetter(x.charAt(7))
&& java.lang.Character.isLetter(x.charAt(8))
&& java.lang.Character.isLetter(x.charAt(9)))
{ // do something for match
}
else
{ // do something for not match
}


Thats's great! I just tried it and upon compling got this error:
"uses or overrides a deprecated API."

Any idea what that means?
Jul 17 '05 #3
Thats's great! I just tried it and upon compling got this error:
"uses or overrides a deprecated API."

Any idea what that means?


I guess Goggle is a wonderful thing! It appears the commands have changed,
but i have moddied what you gave me, and it works great.

if ( x.length()==9
&& java.lang.Character.isLetter(x.charAt(0))
&& java.lang.Character.isLetter(x.charAt(1))
&& java.lang.Character.isSpaceChar (x.charAt(2))
&& java.lang.Character.isDigit(x.charAt(3))
&& java.lang.Character.isDigit (x.charAt(4))
&& java.lang.Character.isSpaceChar (x.charAt(5))
&& java.lang.Character.isLetter(x.charAt(6))
&& java.lang.Character.isLetter(x.charAt(7))
&& java.lang.Character.isLetter(x.charAt(8))
)
Thanks again,
Dave
Jul 17 '05 #4
Liz

"Dave W" <DaveWalker*SPAM*skydivers.co.uk> wrote in message
news:40***********************@news-text.dial.pipex.com...

String x = "LLL 00 LLL";

if ( x.length()==9
&& java.lang.Character.isLetter(x.charAt(0))
&& java.lang.Character.isLetter(x.charAt(1))
&& java.lang.Character.isLetter(x.charAt(2))
&& java.lang.Character.isSpace (x.charAt(3))
&& java.lang.Character.isDigit (x.charAt(4))
&& java.lang.Character.isDigit (x.charAt(5))
&& java.lang.Character.isSpace (x.charAt(6))
&& java.lang.Character.isLetter(x.charAt(7))
&& java.lang.Character.isLetter(x.charAt(8))
&& java.lang.Character.isLetter(x.charAt(9)))
{ // do something for match
}
else
{ // do something for not match
}


Thats's great! I just tried it and upon compling got this error:
"uses or overrides a deprecated API."

Any idea what that means?

Sorry about that.
Depreciation means that there is a better way to do something
in a newer version of Java, and you should be using that instead.
In this case isSpace() should be replaced with isSpaceChar().
I should have compiled it first to see about this. You can
use -deprecation switch to get more information.
javac -deprecation file.java
here is the new version
notice how i put in extra spaces so the argument lines up,
this is a technique that makes it easier to find typing errors
and it makes it easier to read

String x = "LLL 00 LLL";
if (x.length()==9
&& java.lang.Character.isLetter (x.charAt(0))
&& java.lang.Character.isLetter (x.charAt(1))
&& java.lang.Character.isLetter (x.charAt(2))
&& java.lang.Character.isSpaceChar(x.charAt(3))
&& java.lang.Character.isDigit (x.charAt(4))
&& java.lang.Character.isDigit (x.charAt(5))
&& java.lang.Character.isSpaceChar(x.charAt(6))
&& java.lang.Character.isLetter (x.charAt(7))
&& java.lang.Character.isLetter (x.charAt(8))
&& java.lang.Character.isLetter (x.charAt(9)))
{ // do something for match
}
else
{ // do something for not match
}

Jul 17 '05 #5
If you're using JDK1.4 you might also want to look into using regular
expressions, which would do the same thing as the posted code but in
one line - much more maintainable and clear.

- sarge
Jul 17 '05 #6
for a quick a dirty solution yes, that will work. in fact, if you are
involved in writing an entry/security gate, a dedicated procedure of
some sort for this will show up somewhere....

however, if you are looking for something more general purpose, to be
used again, or if you need to worry about performance requirements then
something a bit more intelligent is worth looking at...

i'll see if there is a java string class of some nature that specializes
in this...

- perry

Liz wrote:
"Dave W" <DaveWalker*SPAM*skydivers.co.uk> wrote in message
news:40***********************@news-text.dial.pipex.com...
I wish to validate a string but i'm not quite sure how to go about doing


it.
I'd like to ensure that it is 9 characters long and in the following


format.
"LL 00 LLL" - Thats letter, letter, space, number, number, space, letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a string.

Any help greatly appreciated, including further reading from website.

Regards,
Dave

String x = "LLL 00 LLL";

if ( x.length()==9
&& java.lang.Character.isLetter(x.charAt(0))
&& java.lang.Character.isLetter(x.charAt(1))
&& java.lang.Character.isLetter(x.charAt(2))
&& java.lang.Character.isSpace (x.charAt(3))
&& java.lang.Character.isDigit (x.charAt(4))
&& java.lang.Character.isDigit (x.charAt(5))
&& java.lang.Character.isSpace (x.charAt(6))
&& java.lang.Character.isLetter(x.charAt(7))
&& java.lang.Character.isLetter(x.charAt(8))
&& java.lang.Character.isLetter(x.charAt(9)))
{ // do something for match
}
else
{ // do something for not match
}


Jul 17 '05 #7
something like this...

it'll take you only five minutes and it'll be so much fun to do!

- perry

package samples;

/**
* <p>Title: SmartParse </p>
* <p>Description: Just an example validation class </p>
* <p>Copyright: Perry Anderson</p>
* @author Perry Anderson
* @version 1.0
*/

public class SmartParse {
String validation;

public SmartParse(String validation) {
this.validation = validation;
}

public class BadFormatException extends Exception {}

public void validate(String entry) throws BadFormatException {
if (entry == null || entry.length() != validation.length())
throw new BadFormatException();
for (int i = 0; i < entry.length(); i++) {
char c = validation.charAt(i);
char e = entry.charAt(i);
if (Character.isLetter(c) && !Character.isLetter(e))
throw new BadFormatException();
else
if (Character.isDigit(c) && !Character.isDigit(e))
throw new BadFormatException();
else
if (Character.isSpaceChar(c) && !Character.isSpaceChar(e))
throw new BadFormatException();
}
}

public static void main(String[] args) {
SmartParse smartParse1 = new SmartParse("LLL 00 LLL");
try {
smartParse1.validate("ABC 12 DEF");
}
catch (BadFormatException ex) {
System.out.println("should not be thrown");
}
try {
smartParse1.validate("123 AB 456");
}
catch (BadFormatException ex) {
System.out.println("should be thrown");
}
}

}
Dave W wrote:
I wish to validate a string but i'm not quite sure how to go about doing it.

I'd like to ensure that it is 9 characters long and in the following format.

"LL 00 LLL" - Thats letter, letter, space, number, number, space, letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a string.

Any help greatly appreciated, including further reading from website.

Regards,
Dave


Jul 17 '05 #8
Thank you all for your help.
Jul 17 '05 #9

"Chris" <sa*********@hotmail.com> wrote in message
news:56**************************@posting.google.c om...
If you're using JDK1.4 you might also want to look into using regular
expressions, which would do the same thing as the posted code but in
one line - much more maintainable and clear.

- sarge


I think it's a matter of opinion which is more elegant really. For something
like this that's relatively simple, regexes don't really add much imho.

boolean match = yourString..matches("[a-zA-z]{2} [0-9]{2} [a-zA-z]{3}");
boolean match = yourString.matches("\\p{Alpha}{2} \\d{2} \\p{Alpha}{3}");
Jul 17 '05 #10
that's essentially what i proposed and will work great pending any
custom exception detections... (which would result in what i proposed)

learn something new everyday...

- perry

Murray wrote:

I think it's a matter of opinion which is more elegant really. For something
like this that's relatively simple, regexes don't really add much imho.

boolean match = yourString..matches("[a-zA-z]{2} [0-9]{2} [a-zA-z]{3}");
boolean match = yourString.matches("\\p{Alpha}{2} \\d{2} \\p{Alpha}{3}");


Jul 17 '05 #11
Liz
I think the rolled out version is much faster
than this.
And more clear.
And more maintainable.

"perry" <pe***@cplusplus.org> wrote in message
news:Tz********************@news20.bellglobal.com. ..
something like this...

it'll take you only five minutes and it'll be so much fun to do!

- perry

package samples;

/**
* <p>Title: SmartParse </p>
* <p>Description: Just an example validation class </p>
* <p>Copyright: Perry Anderson</p>
* @author Perry Anderson
* @version 1.0
*/

public class SmartParse {
String validation;

public SmartParse(String validation) {
this.validation = validation;
}

public class BadFormatException extends Exception {}

public void validate(String entry) throws BadFormatException {
if (entry == null || entry.length() != validation.length())
throw new BadFormatException();
for (int i = 0; i < entry.length(); i++) {
char c = validation.charAt(i);
char e = entry.charAt(i);
if (Character.isLetter(c) && !Character.isLetter(e))
throw new BadFormatException();
else
if (Character.isDigit(c) && !Character.isDigit(e))
throw new BadFormatException();
else
if (Character.isSpaceChar(c) && !Character.isSpaceChar(e))
throw new BadFormatException();
}
}

public static void main(String[] args) {
SmartParse smartParse1 = new SmartParse("LLL 00 LLL");
try {
smartParse1.validate("ABC 12 DEF");
}
catch (BadFormatException ex) {
System.out.println("should not be thrown");
}
try {
smartParse1.validate("123 AB 456");
}
catch (BadFormatException ex) {
System.out.println("should be thrown");
}
}

}
Dave W wrote:
I wish to validate a string but i'm not quite sure how to go about doing it.
I'd like to ensure that it is 9 characters long and in the following format.
"LL 00 LLL" - Thats letter, letter, space, number, number, space, letter, letter, letter)

The letter sections mustn't contain numbers and is inputed from a string.
Any help greatly appreciated, including further reading from website.

Regards,
Dave

Jul 17 '05 #12
it's just a matter of what he wants to do...

if he's addressing one simple field with one simple expression check,
what you got there is as simple as it gets (especially for someone who
does not know regular expressions)

but the moment he's got to maintain more than one field with customized
error handling he's pretty much in a quadmire of "gotcha's" unless he
breaks down the problem into a series of resuable parts.....

just speaking from past experience

cheers

- perry
Liz wrote:
I think the rolled out version is much faster
than this.
And more clear.
And more maintainable.

"perry" <pe***@cplusplus.org> wrote in message
news:Tz********************@news20.bellglobal.com. ..
something like this...

it'll take you only five minutes and it'll be so much fun to do!

- perry

package samples;

/**
* <p>Title: SmartParse </p>
* <p>Description: Just an example validation class </p>
* <p>Copyright: Perry Anderson</p>
* @author Perry Anderson
* @version 1.0
*/

public class SmartParse {
String validation;

public SmartParse(String validation) {
this.validation = validation;
}

public class BadFormatException extends Exception {}

public void validate(String entry) throws BadFormatException {
if (entry == null || entry.length() != validation.length())
throw new BadFormatException();
for (int i = 0; i < entry.length(); i++) {
char c = validation.charAt(i);
char e = entry.charAt(i);
if (Character.isLetter(c) && !Character.isLetter(e))
throw new BadFormatException();
else
if (Character.isDigit(c) && !Character.isDigit(e))
throw new BadFormatException();
else
if (Character.isSpaceChar(c) && !Character.isSpaceChar(e))
throw new BadFormatException();
}
}

public static void main(String[] args) {
SmartParse smartParse1 = new SmartParse("LLL 00 LLL");
try {
smartParse1.validate("ABC 12 DEF");
}
catch (BadFormatException ex) {
System.out.println("should not be thrown");
}
try {
smartParse1.validate("123 AB 456");
}
catch (BadFormatException ex) {
System.out.println("should be thrown");
}
}

}
Dave W wrote:
I wish to validate a string but i'm not quite sure how to go about doing
it.
I'd like to ensure that it is 9 characters long and in the following
format.
"LL 00 LLL" - Thats letter, letter, space, number, number, space,
letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a
string.
Any help greatly appreciated, including further reading from website.

Regards,
Dave



Jul 17 '05 #13
Liz
I worked for a guy once and he came up with this instruction:
If you want to do something more than what is required
on this project, I will not pay even a dime for it. No matter
how much better it is, or how much more it will do; not a dime.
"perry" <pe***@cplusplus.org> wrote in message
news:x0*********************@news20.bellglobal.com ...
it's just a matter of what he wants to do...

if he's addressing one simple field with one simple expression check,
what you got there is as simple as it gets (especially for someone who
does not know regular expressions)

but the moment he's got to maintain more than one field with customized
error handling he's pretty much in a quadmire of "gotcha's" unless he
breaks down the problem into a series of resuable parts.....

just speaking from past experience

cheers

- perry
Liz wrote:
I think the rolled out version is much faster
than this.
And more clear.
And more maintainable.

"perry" <pe***@cplusplus.org> wrote in message
news:Tz********************@news20.bellglobal.com. ..
something like this...

it'll take you only five minutes and it'll be so much fun to do!

- perry

package samples;

/**
* <p>Title: SmartParse </p>
* <p>Description: Just an example validation class </p>
* <p>Copyright: Perry Anderson</p>
* @author Perry Anderson
* @version 1.0
*/

public class SmartParse {
String validation;

public SmartParse(String validation) {
this.validation = validation;
}

public class BadFormatException extends Exception {}

public void validate(String entry) throws BadFormatException {
if (entry == null || entry.length() != validation.length())
throw new BadFormatException();
for (int i = 0; i < entry.length(); i++) {
char c = validation.charAt(i);
char e = entry.charAt(i);
if (Character.isLetter(c) && !Character.isLetter(e))
throw new BadFormatException();
else
if (Character.isDigit(c) && !Character.isDigit(e))
throw new BadFormatException();
else
if (Character.isSpaceChar(c) && !Character.isSpaceChar(e))
throw new BadFormatException();
}
}

public static void main(String[] args) {
SmartParse smartParse1 = new SmartParse("LLL 00 LLL");
try {
smartParse1.validate("ABC 12 DEF");
}
catch (BadFormatException ex) {
System.out.println("should not be thrown");
}
try {
smartParse1.validate("123 AB 456");
}
catch (BadFormatException ex) {
System.out.println("should be thrown");
}
}

}
Dave W wrote:

I wish to validate a string but i'm not quite sure how to go about
doing
it.
I'd like to ensure that it is 9 characters long and in the following


format.
"LL 00 LLL" - Thats letter, letter, space, number, number, space,


letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a


string.
Any help greatly appreciated, including further reading from website.

Regards,
Dave


Jul 17 '05 #14
"Liz" <Li*@nospam.com> wrote in message news:<shYoc.6723$6f5.547138@attbi_s54>...
I worked for a guy once and he came up with this instruction:
If you want to do something more than what is required
on this project, I will not pay even a dime for it. No matter
how much better it is, or how much more it will do; not a dime.


There are two kinds of object orientation: tactical object orientation
and strategic object orientation.

Tactical OO is when you're given a set of requirements to implement
over a series of increments. These requirements can be thought of as
changes to a codebase, but changes over which you have (or your
Product Management have) total control.

If you spot two functions within these requirements that are merely
different implementations of the same interface, for example, then you
might code the interface and one implementation in increment 1, and
stick it behind a parameterised Factory pattern.

Then when you implement the second implementation in increment 2, you
know that clients will be able, with minimum impact (basically
changing the parameter in the call to the Factory), to use and test
this second implementation, because the interface is unchanged. This
is basic Variance Encapsulation, as described in GoF's Design
Patterns.

Strategic object orientation is trying to design variance
encapsulation for changes which will only come into play after your
product is released. You have no control over these changes. You can
sift nebulous standards and keep an eye on the newest technologies,
and you can guess how to design your code so that, should you be lucky
enough to have identified a future requirement/change, then your code
will be flexible enough allow the change without much re-work.

If you get strategic object orientation wrong, then you've wasted
loads of those dimes that your boss was concerned about.

That phrase, "... something more than what is required on this
project," sounds like tactical-thinking, and there's nothing wrong
with it. You could argue that strategic OOers risk more, and those
risks may ruin or win-all. If OO guaranteed results, no one would
write code in any other way. It doesn't, and they do.

Is your boss still in the business?

..ed

www.EdmundKirwan.com
Jul 17 '05 #15
Dave W wrote:
I wish to validate a string but i'm not quite sure how to go about doing it.

I'd like to ensure that it is 9 characters long and in the following format.

"LL 00 LLL" - Thats letter, letter, space, number, number, space, letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a string.

Any help greatly appreciated, including further reading from website.


Try this :

public class Sample {
public static void main( String args[] )
{
String tests[] = { "LLL00LLL", "LLL00L0L", "000LL000" };

for ( int ctr = 0 ; ctr < tests.length ; ctr++ ) {
if ( tests[ctr].matches(
"\\p{Alpha}{3}\\p{Digit}{2}\\p{Alpha}{3}" ) ) {
System.out.println( tests[ctr] + " - match" );
} else {
System.out.println( tests[ctr] + " - miss" );
}
}

return;
}
}

Tim

Jul 17 '05 #16
So much for checking my work....

The expression should be:

"\\p{Alpha}{2} \\p{Digit}{2} \\p{Alpha}{3}"

Tim

Tim Orbaker wrote:
Dave W wrote:
I wish to validate a string but i'm not quite sure how to go about
doing it.

I'd like to ensure that it is 9 characters long and in the following
format.

"LL 00 LLL" - Thats letter, letter, space, number, number, space, letter,
letter, letter)

The letter sections mustn't contain numbers and is inputed from a string.

Any help greatly appreciated, including further reading from website.

Try this :

public class Sample {
public static void main( String args[] )
{
String tests[] = { "LLL00LLL", "LLL00L0L", "000LL000" };

for ( int ctr = 0 ; ctr < tests.length ; ctr++ ) {
if ( tests[ctr].matches(
"\\p{Alpha}{3}\\p{Digit}{2}\\p{Alpha}{3}" ) ) {
System.out.println( tests[ctr] + " - match" );
} else {
System.out.println( tests[ctr] + " - miss" );
}
}

return;
}
}

Tim


Jul 17 '05 #17
Liz

<ia********@hotmail.com> wrote in message
news:48**************************@posting.google.c om...
"Liz" <Li*@nospam.com> wrote in message news:<shYoc.6723$6f5.547138@attbi_s54>...
I worked for a guy once and he came up with this instruction:
If you want to do something more than what is required
on this project, I will not pay even a dime for it. No matter
how much better it is, or how much more it will do; not a dime.


There are two kinds of object orientation: tactical object orientation
and strategic object orientation.

Tactical OO is when you're given a set of requirements to implement
over a series of increments. These requirements can be thought of as
changes to a codebase, but changes over which you have (or your
Product Management have) total control.

If you spot two functions within these requirements that are merely
different implementations of the same interface, for example, then you
might code the interface and one implementation in increment 1, and
stick it behind a parameterised Factory pattern.

Then when you implement the second implementation in increment 2, you
know that clients will be able, with minimum impact (basically
changing the parameter in the call to the Factory), to use and test
this second implementation, because the interface is unchanged. This
is basic Variance Encapsulation, as described in GoF's Design
Patterns.

Strategic object orientation is trying to design variance
encapsulation for changes which will only come into play after your
product is released. You have no control over these changes. You can
sift nebulous standards and keep an eye on the newest technologies,
and you can guess how to design your code so that, should you be lucky
enough to have identified a future requirement/change, then your code
will be flexible enough allow the change without much re-work.

If you get strategic object orientation wrong, then you've wasted
loads of those dimes that your boss was concerned about.

That phrase, "... something more than what is required on this
project," sounds like tactical-thinking, and there's nothing wrong
with it. You could argue that strategic OOers risk more, and those
risks may ruin or win-all. If OO guaranteed results, no one would
write code in any other way. It doesn't, and they do.

Is your boss still in the business?


That was 20 years ago. It was in the new product development group,
and there was no assurance that the product would be accepted yet
alone be the base for enhanced features. Sometimes these sorts of
things would demonstrate that there is no demand or that a fundamental
restructuring would be necessary for viability.

.ed

www.EdmundKirwan.com

Jul 17 '05 #18
all things considered, i was in a position where just such "instruction"
should have been applied.... instead, i had an over-zealous programmer
who wanted to write 10x to 100x the amount of code necessary yet
essentially halted all other resources and manpower for getting anything
done....

he was the stereo-typical "No" person and they are derived from the
passive-task oriented section of the grid, an area typical left to
"analysts"....

the best way to deal with a "No" person is to highlight all the negative
aspects to your proposed solution before they get a chance to. that way
the "No", having the insane need to find something "wrong", invariably
cannot disagree with himself or performs a double negative... in
otherwords, he (or she) ends become a "resource" standing behind and
supporting your proposed solution.

childish as it may seem, the "No" person is able to sway the crowd
because he is able to broadcast that he simply wants to no one to make a
"terrible mistake". yet, in the real world, he ends up causing "No"
decision to be made at all, even at the total expense of the project...

and money is "No" object, that last project was a million dollars gone
into the ground... just before that another fanatical "No" person and
his insane "company wide standard" drowned a 66 million dollar project...

it's pretty funny, in certain situations, the failure of a given project
is what everybody wants.... after all, if you are being paid $165 per
hour just to be a "Yes" man why rock the boat...

getting back to what Liz was saying, there is something to be said about
knowing the requirements of a given project. in both of the above cases
that was my primary focus and usually is the best way to reach some sort
of target. the principle draw back to doing up the requirements however
is that any given "political" system is not necessarily going to be
interest in any form of "progress"...

at the end of the day, all you can really do tread water....

check out Rick & Rick's seminar on "How to deal with Difficult People"
via the CareerTrack website. as sophisticaed as RUP and similiar
techniques can be, it all seems to be going back to the basic skill of
"learning" how to listen to people....

and Liz is speaking from experience...

cheers

- perry

Liz wrote:
I worked for a guy once and he came up with this instruction:
If you want to do something more than what is required
on this project, I will not pay even a dime for it. No matter
how much better it is, or how much more it will do; not a dime.


Jul 17 '05 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Brian | last post by:
I am having alot of trouble getting a XML document validated with a schema. I got a sample document and schema off of w3schools.com, which passed an online xml validator:...
2
by: wumingshi | last post by:
Hi, When validating an XML instance, sometimes the schema is not enough to expression the validation rules. Additional validation rules may be expressed in an application-specific way. For...
2
by: Marcin Cenkier | last post by:
Hi, I want to validate a DOM document, and if I build DOM from a stream using documentBuilder.parse() validation using validator.validate(DOMSource) works, but if I create the same document...
0
by: info | last post by:
Hi, Is it possible to include in the Schema validation file, every custom error message for each validation rules? This mean, in the same xsd file we can have the validation rules (patterns)...
0
by: pradheepayyanar | last post by:
JAVAians i have a small requirement which i am doin in java swing. i need to validate a field which will accept only numbers and dots. for example: i have a version number field which has to...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
1
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in...
0
by: kokababu | last post by:
Hi, I have created an XML writer module to write xml using StaX api for our Rest Web Service(using Jersey). I am validating my XML against schema. It works Locally without any error but when I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.