[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Validation

Newb Newb

8/21/2008 3:34:00 AM

Hi all..i am newb for rails as well as ruby
I have Column called Description In My Table.
I would Like to Validate That Description Column.
That is It Should Only Contain Texts Not Images.
What Do I DO With Using Regular Expressions?


Any Advices Regarding This???
--
Posted via http://www.ruby-....

4 Answers

Phlip

8/21/2008 8:04:00 AM

0

Newb Newb wrote:

> Hi all..i am newb for rails as well as ruby

The best group for Rails questions is:

http://groups.google.com/group/rubyon...

But you should read /Agile Web Development with Rails/, by the Daves, before
asking any questions there.

> I have Column called Description In My Table.
> I would Like to Validate That Description Column.
> That is It Should Only Contain Texts Not Images.

Validations are not invariants, they are part of user interaction. How will your
users put content into the description? If they post it thru a <textarea>, it
already is only ASCII (actually UTF-8) text. <textarea> cannot absorb rich text
input with pictures.

> What Do I DO With Using Regular Expressions?

Some validation directives accept a regexp, but you need to characterize what an
"image" would look like in your input before bouncing it. If, for example, you
allow users to enter raw HTML, and you will mark it up when displaying it, you
could write a regexp against "<img". But this will fail if the user wanted a
cleartext "<img" in their message, and it will fail to remove '<object' and
'<embed' tags.

Read the book, then post more of your application details to the Rails-talk group!

--
Phlip

spudnik

3/5/2011 9:21:00 PM

0

that the partial pressure of CO2 has varied a lot more,
than would be suspected from certain groups of theorists?

> Your point is what?

:ScrollinG:
relativity of vacuum means, there is no absolute vacuum
in a specified "box o'space," although Pascal thought
that he had discovered this, essentially in a really big barometer.
now, if you want to apply Heisenberg's uncertainty to that,
don't overdo it & sprain anything.

the lightcone (and Minkowski, though a great geometer,
put his pants on, one lightcone at a time) is an artifact
of the silly sloganeering about "spacetime," merely a phasespace,
typically done-up in a "1+1d" quarterplane diagram ...
which is useful, because functions are defined to have no loops --
a-hem.... useful, because special rel. can be done in quaternions,
where the scalar & vector parts are clearly dystinguished.

dechucka

3/5/2011 10:05:00 PM

0


"rasterspace" <Space998@hotmail.com> wrote in message
news:5abf36aa-e79d-4ed0-bcb6-a6bbca176e58@f15g2000pro.googlegroups.com...
> that the partial pressure of CO2 has varied a lot more,
> than would be suspected from certain groups of theorists?

Which is why we talk averages to cut out these variations between places


>
>> Your point is what?
>
> :ScrollinG:
> relativity of vacuum means, there is no absolute vacuum
> in a specified "box o'space," although Pascal thought
> that he had discovered this, essentially in a really big barometer.
> now, if you want to apply Heisenberg's uncertainty to that,
> don't overdo it & sprain anything.
>
> the lightcone (and Minkowski, though a great geometer,
> put his pants on, one lightcone at a time) is an artifact
> of the silly sloganeering about "spacetime," merely a phasespace,
> typically done-up in a "1+1d" quarterplane diagram ...
> which is useful, because functions are defined to have no loops --
> a-hem.... useful, because special rel. can be done in quaternions,
> where the scalar & vector parts are clearly dystinguished.

Earl Evleth

3/6/2011 12:27:00 PM

0

On 6/03/11 12:03, in article 4d736a1d$0$7062$426a74cc@news.free.fr, "Paul
Aubrin" <chu8i443@free.fr> wrote:

> Mauna Loa is just one single place.

There are others

http://cdiac.ornl.gov/trends/co2/co...

For instance, Alert

http://cdiac.ornl.gov/trends/co2/graphics/Ale...

It has reached the 390 ppm level

You have a choice, you want the South Pole at 9000
feet and you have it

Or Christman Island at sea level

http://cdiac.ornl.gov/trends/co2/graphics/Christmas_Isla...


All ofthem are going up up up in CO2.

The stuff is equidistributed.

Got it straight