I don't think there is a direct way of validate textbox. But, here's what you can do. Take a label near your textbox.
Set the OnChange property of the Text Input control (TextInput1) to following:
If(
Value(TextInput1.Text)<1 || Value(TextInput1.Text)>25,
UpdateContext({ShowErrorMsg:true});Reset(TextInput1),
UpdateContext({ShowErrorMsg:false})
)
Set the Text property of a Label control to following:
"Your must type values between 1 and 25."
Set the Visible property of the Label control to following:
ShowErrorMsg
This will reset the textinput if user enters anything other than your range and display error in label