We want to apply number digit validation while entering mobile number at the time of MFA registration.
We tried to use restriction and predicates, but both doesn't help at all.
this example shows to allow users to enter Denmark number with country code or without country code. I am using the regex expression for this validation.
<ClaimType Id="mobile">
<DisplayName>Phone Number</DisplayName>
<DataType>string</DataType>
<UserHelpText>Your phone number.</UserHelpText>
<UserInputType>TextBox</UserInputType>
<Restriction>
<Pattern RegularExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" HelpText="Please enter valid phone number e.g +45XXXXXXXX" />
</Restriction>
</ClaimType>
but if you want your user only to enter digits with no special character and no alphabet then please follow this
<ClaimType Id="mobile">
<DisplayName>Phone Number</DisplayName>
<DataType>string</DataType>
<UserHelpText>Your phone number.</UserHelpText>
<UserInputType>TextBox</UserInputType>
<Restriction>
<Pattern RegularExpression="^[0-9]+$" HelpText="Please enter valid phonenumber" />
</Restriction>
</ClaimType>
Related
I am tring to create a DocuSign template and I need to be able to insert a field which shows a currency amount (for example $12.55 ). I need to show the dollar sign and possibly calculate the values based on other field values.
I am able to calculate values using a formula fields, but I don't see ho to mask the formula fields to show a dollar sign. The only workaround that I was able to come up with is to make a static text field with a dollar sign next to a formula field as show in the picture:
Is there a way to add a currency field (validation) in DocuSign?
No - your dollar sign workaround is the only real option, although you do want to make sure you make the $ field read only so the signer doesn't type anything into it.
It would be possible to use custom validation and regex to make a text field that accepts a dollar amount, but it wouldn't be usable with a Formula field. Formula fields only accept input from Number and Date validation fields.
There is an open Enhancement Request regarding this, but it has not been prioritized and is not currently on the roadmap for implementation. If you would like to express interest, contact your DocuSign Account Team and reference issue MAR-29946.
may i know how to ask user to give correct input in Dialogflow...
for example if user has to enter a number between 1-100 numbers but he entered a value exceeding that limit. how to verify it using Webhooks
I have a website built in Kentico 6. There is a contact us form with phone number field. Kentico's phone field format is US Phone Number which gives you three boxes (3+3+4). I have an address setup in Chrome's autofill settings with phone number as 123-456-7890 format (I tried (123) 456-7890 and 1234567890 as well). When filling out the form I select the value from the autofill and all fields are populated correctly except the phone number: phone number's area code and the next 3 numbers are flipped. For example: the real phone number is 612-556-9003, but after autofill it is displayed as 556-612-9003. see this image
Not sure what would cause that, but you could switch it over to a text field and then use a client side libary to control the field content or give it a format.
I've never had good luck using that form control without having to customize it. So the best thing to do is change the field control from a Phone number to a Textbox and add a regex to it to validate a phone number. Here is a good example of a valid 10 digit phone number regex.
I want to bind a value and format it with a localized string. Something like that :
<TextBlock Text="{Binding Age, StringFormat='\{0\} {Binding Path=LocalizedResources.Global_AgeSuffix, Source={StaticResource LocalizedStrings}}'}" />
Output :
30 ans if french culture
30 years if other culture
Is it possible ?
Regards,
Flo
Unfortunately you can't format bound text this way on Windows Phone.
There are two alternatives.
Add another property to the bound object which has the formatting already applied
Apply the formatting with a converter.
When I create a content type for SharePoint in XML in Visual Studio. Is it possible to create a field with the Type "Number" and give it a custom format? I don't want the thousands separator, but for some reasons I can't use the type "Integer" ...
EDIT: I tried this without success ...
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Element (0x01) -->
<ContentType ID="0xMyId"
Name="MyType"
Group="MyGroup"
Description="..."
Inherits="TRUE"
Version="0">
<FieldRefs>
<FieldRef ID="{5231bb5f-37c8-4ca8-b256-58337cfe82d3}" Name="Right_ID" DisplayName="Right ID" Required="TRUE" />
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="TRUE" />
</FieldRefs>
</ContentType>
<Field ID="{5231bb5f-37c8-4ca8-b256-58337cfe82d3}"
Type="Number"
Commas="FALSE"
Decimals="0"
Name="Right_ID"
Group="My Group"
DisplayName="Right ID"
StaticName="Right_ID"
Hidden="FALSE"
Required="TRUE"
Sealed="FALSE" />
</Elements>
Maybe I should add, that the target system has german culture, so the thousands separator is . (dot) not , (comma).
If you are creating a custom field, you should be able to set Commas to FALSE in the Field Element. But that attribute is not listed as supported in the FieldRef Element of a Content Type.
EDIT:
I'm beginning to wonder if Commas does not work on Number regardless of locale.
From MSDN (emphasis mine):
Integer Allows for positive or
negative integer values. The Commas
and NegativeFormat attributes are used
to specify integer formatting.
Corresponds to the int SQL data type.
and
Number Allows for a floating point
number to be entered. This field is
sortable and groupable. Numbers
entered are parsed according to the
current locale settings for decimal
points and thousand separators.
Negative numbers can be indicated by
wrapping them in parentheses or by
using a negative symbol. The following attributes can be used in conjunction with the Number attribute to specify number formatting: Decimals, Div, Max, Min, Mult, and Percentage.
With this, to remove the thousands separator I would either:
Try Integer again
Create a Calculated field based on the Number field that removes the comma by converting to text.