05AB1E, 15 bytes
TG9LNýN.øŒ})˜Iå
###Explanation### TG9LNýN.øŒ})˜Iå TG } # For 1 to 9... 9L # Push [1 .. 9] Ný # Join with current value N.ø # surround with current value Œ # Push substrings ) # Wrap stack to array ˜ # Deep flatten the array I # Push input å # Is the input in the array? # Implicit print
Explanation
TG9LNýN.øŒ})˜Iå
TG } # For 1 to 9...
9L # Push [1 .. 9]
Ný # Join with current value
N.ø # surround with current value
Œ # Push substrings
) # Wrap stack to array
˜ # Deep flatten the array
I # Push input
å # Is the input in the array?
# Implicit print
It should work (test cases did) but if you find any flaws please let me know.
14 Bytes if no output counts as falsy:
TG9LNýN.øŒIåi1