This forum is devoted to the discussion about the software DaDaBIK database front-end
the PHP Database application generator for MySQL, PostgreSQL and SQLite; also available for Wordpress.

Welcome! Log In Create A New Profile


URL validation - hyphens

Posted by mauri 
URL validation - hyphens
March 20, 2012 11:41AM

it seems DaDaBIK 4.3_beta considers hyphen "-" as not allowed in URL's - and it is actually valid. specifies what is allowed, but I guess the simplest thing to do is to avoid the trouble completely by using the PHP function:

function is_valid_url($url)
// goal: chek if an url address is valid, according to its syntax
// input: $url
// output: true if it's valid, false otherwise
  if ( filter_var( $url, FILTER_VALIDATE_URL ) == FALSE )
    return FALSE;
    return TRUE;
} // end function is_valid_url

Mauri Tikka
Re: URL validation - hyphens
March 26, 2012 07:59AM
Hi Mauri I've just tried to insert and it actually works.

Eugenio |\.-./| DaDaBIK developer and project admin
Sorry, only registered users may post in this forum.

Click here to login