In message <[EMAIL PROTECTED]>
Gervase Markham <[EMAIL PROTECTED]> wrote:
> Tom Hughes wrote:
>> It's not complaining about the file (it hasn't even looked at the
>> contents of the file) but rather about the contents of the upload
>> form. Specifially about the tags field - most likely you have put
>> in a character it does not allow (/ ; , . and ? are not allowed)
>
> Aha. Given that many tagging implementations expect tags to be separated
> with commas, would it be too much for the upload mechanism to strip out
> commas rather than barfing on them?
>
> Also, perhaps:
>
> "The 'tags' field you wrote contains an invalid character"
>
> would be a better error message. For bonus points, give the contents of
> the field and say which character was illegal.
Um - it's all rails stuff basically. I just say:
validates_format_of :tag, :with => /^[^\/;.,?]*$/
and rails does the rest... I can probably give it a custom
message if I look at the doco.
Tom
--
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev