Add specific validation to text

Hi! Just wanna ask how can I make the text file only accept values that are in this format

1.1.1

1.2.2

etc

  Discussion posts and replies are publicly visible