Hi,
You can do it on XSD.
Decimal data validation,
<simpleType name='Comp_Pr'>
<restriction base='decimal'>
<fractionDigits value='1'/>
<minInclusive value='1.0'/>
<maxInclusive value='100.0'/>
</restriction>
</simpleType
For the date validation, you can use the following rules.
pattern enumeration
whiteSpace
maxInclusive
maxExclusive
minInclusive
minExclusive
String Length:
<simpleType name='input_string'>
<restriction base='string'>
<maxLength value='50'/>
</restriction>
</simpleType>
Hope this might help you.