NET supports the JSON Schema standard via the Json Schema and Json Validating Reader classes. To skip the overhead of loading JSON into a JObject/JArray, validating the JSON, and then deserializing the JSON into a class, Json Validating Reader can be used with Json Serializer to validate JSON while the object is being deserialized.
Please refer to the errata for this document, which may include some normative corrections. This document is also available in these non-normative formats: XML and Change markings relative to first edition.
This document defines constructor functions, operators and functions on the datatypes defined in [XML Schema Part 2: Datatypes Second Edition] and the datatypes defined in [XQuery 1.0 and XPath 2.0 Data Model].
It also discusses functions and operators on nodes and node sequences as defined in the [XQuery 1.0 and XPath 2.0 Data Model].
Because the input type obscures the text typed, you should let the user confirm that they haven't made a mistake.
The simplest way to do this is to have the password entered twice, and then check that they are identical.