You are given a string s consisting only of the characters '(', ')', '{', '}', '[' and ']'. Determine whether the input string is valid according to these rules:
Return true if the string is valid, and false otherwise.
Example 1:
Input: s = "()"
Output: true
Example 2:
Input: s = "({[]})"
Output: true
Example 3:
Input: s = "(]"
Output: false
Constraints:
1 <= s.length <= 1000s consists of parentheses only: '()[]{}'.