Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    [Regex] validare intero 1 9999999999

    Ciao.

    per funzionare funziona ma
    vorrei un parere non essendo
    proprio un mago con le regex:


    if(!(bool)preg_match("/^([1-9])\d{0,9}$/",$value)){}



    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  2. #2
    Utente di HTML.it L'avatar di carlo2002
    Registrato dal
    Jun 2002
    Messaggi
    2,746
    perchè no is_numeric() ?
    Errare humanum est, perseverare ovest

  3. #3
    Originariamente inviato da carlo2002
    perchè no is_numeric() ?
    Codice PHP:
    is_numeric(0// true
    is_numeric(1234567891111// true 

    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

  4. #4
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.