----- Original Message -----
From: "Martin Aliger" <[EMAIL PROTECTED]>
To: "! nant" <[EMAIL PROTECTED]>
Sent: Friday, September 12, 2003 11:27 AM
Subject: [nant-dev] regex task
> Hi all,
>
> What is good at
> [StringValidator(AllowEmpty=false)]
>
StringValidator (with AllowEmpty = false) ensures that a non-empty values is
specified for a certain attribute. We already had a Required property on
the TaskAttribute to indicate whether a certain build attribute should be
specified or not, however this attribute did not cause NAnt to check whether
the specified value was not empty. This caused problems for tasks that rely
on a attribute to be specified and the value to be not empty (eg. a copy
task that expects a source filename).
We did not want to change the semantics of the TaskAttribute.Required
property, as that would break backward compatibilty (not every required
attribute actually needs to have a significant value, as demonstrated by the
input attribute of the regex task).
> in input parameter of regex? Why input could not be empty? I see no reason
> there.
>
> For example:
> <regex pattern="^(?'changes'.*) $" input="${changes}"/>
>
> This cut of last space from changes property. If changes is accidentally
> empty, no cut is performed. But recent change in StringValidator disable
> such use of regex, and build fails (even with failonerror="false"! )
To start, I just added a
[StringValidator(AllowEmpty=false)]
to all build attributes of which the TaskAttribute.Required property was set
to "true".
But in case of the input attribute of the regex task, this was indeed not
necessary. I'll revert the change for this attribute later today (I don't
have cvs access right now).
Thanks for report this.
Gert
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers