Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-27-2008, 08:21 AM
Junior Member
 
Join Date: Apr 2008
Posts: 28
Default Form Issue: value "0" in text treated as null

Hey!

Like the title says. I've got a form and it has to treat the field as a String rather then an Integer (even though it only has a numeric value).

It's a field where you fill in the version.

Main version: 1
sub version: 0


I've got a digits filter on both of those fields. Main version never will be a problem since they won't start with version 0.x.

sub version is a problem because version 1.01 isn't the same as 1.1.

How can I get it to treat the formfield as a String? Only thing I can think about is creating a custom validator with and use regex. But that seems like working around the issue for something this stupid?

EDIT: Seems like I can't do it with the validator either. Because it's set to required ($subversion -> setRequired(true) The field can't contain a 0. I can't require it to false or it won't show that it has to be filled in while it has to.

This is pretty flibbled. how do you solve this stuff (-.-")?

Last edited by Filip : 05-27-2008 at 08:43 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:52 AM.