Opened 16 years ago

Closed 15 years ago

#39 closed enhancement (fixed)

Handling a string with only blank space in required fields

Reported by: Martin Svensson Owned by: Martin Svensson
Priority: trivial Milestone: BASE 2.0
Component: web Version:
Keywords: Cc:

Description

When trying to submit a required textfield that just contains blank spaces. There comes an error message about invalid data that perhaps is difficult to understand for the common user. The message is: "Invalid use of null. The 'name' value cannot be set to null."

Perhaps a string with only spaces could be handled in the same way as an empty textfield/string.

Change History (7)

comment:1 Changed 16 years ago by Nicklas Nordborg

Milestone: BASE 2.0 RC2

comment:2 Changed 16 years ago by Gregory Vincic

Owner: changed from Gregory Vincic to Nicklas Nordborg

comment:3 Changed 16 years ago by Nicklas Nordborg

I have added a JavaScript? funtion to main library: Main.trimString() which trims a string from leading and trailing spaces.

Use like this:

if (Main.trimString(frm.name.value) == '')
{
   alert("You must enter a name");
   frm.name.focus();
   return false;
}

comment:4 Changed 16 years ago by Nicklas Nordborg

Milestone: BASE 2.0 RC2BASE 2.0

comment:5 Changed 15 years ago by Martin Svensson

Owner: changed from Nicklas Nordborg to Martin Svensson
Status: newassigned

comment:6 Changed 15 years ago by Martin Svensson

(In [2509]) References #39 Handling a string with only blank space in required fields Admin pages updated.

comment:7 Changed 15 years ago by Martin Svensson

Resolution: fixed
Status: assignedclosed

(In [2511]) Fixes #39 Handling a string with only blank space in required fields. Remaining pages updated.

Note: See TracTickets for help on using tickets.