how can I put a constraint on a text question which does not allow spaces to be entered?

is it possible to put a constraint on an integer question type which allows you to only put in multiples of 5 for example? If so would you have the formula?

Match a single character not present in the list below [^ ]+ + Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed (greedy) " " matches the space character literally (case sensitive)

$ asserts position at the end of a line

For 2: constraint: . mod 5 = 0

See Math Operators about the mod operator; it returns the remainder after integer division.