Skip to content

Properties

Field-specific properties

PropertyTypeDescription
countriesstring(optional) List only a certain set of countries: Scandinavia, Nordic, Europe or Prioritized(all countries sorted by priority). Defaults to Prioritized.
filterCountriesfunction(optional) Use this prop to filter out certain countries. The function receives the country object and should return a boolean. Returning false will omit the country.
patternstring(optional) Validation based on regex pattern for the number field e.g. pattern="^[49]+".
omitCountryCodeFieldboolean(optional) If true is given, then everything related to country code is removed.
countryCodeFieldClassNamestring(optional) Class name for the country code component.
numberFieldClassNamestring(optional) Class name for the number component.
countryCodePlaceholderstring(optional) Placeholder for the country code field.
countryCodeLabelstring(optional) Label to show above / before the country code field.
numberMaskVarious(optional) See property mask of the InputMasked component.
widthstring | false(optional) large for predefined standard width, stretch for fill available width.
labelstring(optional) Field label to show above / before the phone number input field.
sizestring
number
(optional) The sizes you can choose is default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size={2} then it will be forwarded as the input element attribute. Consider rather setting field sizes with Form.Appearance.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

General properties

PropertyTypeDescription
valuestring(optional) Source data value for the field. Will take precedence over the path value given in the data context.
defaultValuestring(optional) Default source data value for the field. Will not take precedence over the path value given in the data context.
pathstring(optional) JSON Pointer for where the data for the field is located in the source dataset (when using Form.Handler or DataContext). The path will also be set as the name attribute for the string-field.
infoReact.Node
Array<React.Node>
function
(optional) Info message shown below / after the field. When provided as a function, the function will be called with the current value as argument. The second parameter is an object with { conditionally, getValueByPath, getFieldByPath }. To show the message first after the user has interacted with the field, you can call and return conditionally function with a callback and with options: conditionally(() => 'Your message', { showInitially: true })
warningReact.Node
Array<React.Node>
function
(optional) Warning message shown below / after the field. When provided as a function, the function will be called with the current value as argument. The second parameter is an object with { conditionally, getValueByPath, getFieldByPath }. To show the message first after the user has interacted with the field, you can call and return conditionally function with a callback and with options: conditionally(() => 'Your message', { showInitially: true })
errorError
FormError
Array<Error | FormError>
function
(optional) Error message shown below / after the field. When provided as a function, the function will be called with the current value as argument. The second parameter is an object with { conditionally, getValueByPath, getFieldByPath }. To show the message first after the user has interacted with the field, you can call and return conditionally function with a callback and with options: conditionally(() => 'Your message', { showInitially: true })
disabledboolean(optional) Set true to show the field but without the possibility of changing the value.
emptyValuestring
undefined
(optional) The value to use (in onChange events etc) when emptying the field. Makes it possible for instance to provide undefined instead of an empty string when clearing the content of a text input.
requiredboolean(optional) When set to true, the field will give an error if the value fails the required validation. When set to false, the field will not be required, but will add a "(optional)" suffix to the label.
labelSuffixReact.Node(optional) Will append an additional text to the label, like "(optional)". When using inheritLabel, the suffix will not be inherited. NB: The visual appearance of the labelSuffix may change in the future.
schemaobject(optional) Custom JSON Schema for validating the value.
validateInitiallyboolean(optional) Set to true to show validation based errors initially (from given value-prop or source data) before the user interacts with the field.
validateUnchangedboolean(optional) Set to true to show validation based errors when the field is touched (like focusing a field and blurring) without having changed the value. Since the user did not introduce a new error, this will apply when the value was initially invalid based on validation.
validateContinuouslyboolean(optional) Set to true to show validation based errors continuously while writing, not just when blurring the field.
errorMessagesobject(optional) Custom error messages for each type of error, overriding default messages. The messages can be a React.ReactNode or a string.
onChangeValidatorfunction(optional) Custom validator function where you can return undefined, Error, FormError or an Array with either several other validators or several Error or FormError. It is triggered on every change done by the user. The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }.
onBlurValidatorfunction(optional) Custom validator function where you can return undefined, Error, FormError or an Array with either several other validators or several Error or FormError. It is triggered when the user leaves a field (e.g., blurring a text input or closing a dropdown). The function can be either asynchronous or synchronous. The first parameter is the value, and the second parameter returns an object containing { errorMessages, connectWithPath, validators }.
transformInfunction(optional) Transforms the value before its displayed in the field (e.g. input).
transformOutfunction(optional) Transforms the value before it gets forwarded to the form data object (context) or returned as the onChange value parameter. The first parameter is the internal value. Some fields do support a second parameter, like the SelectCountry, where the country object is given.
labelSrOnlyboolean(optional) Use true to make the label only readable by screen readers.
helpobject(optional) Provide help content for the field using title and content as a string or React.Node. Additionally, you can set open to true to display the inline help, set the breakout property to false to disable the breakout of the inline help content, or use renderAs set to dialog to render the content in a Dialog (recommended for larger amounts of content).
widthstring
false
(optional) Will set the width for the whole block. Use small, medium, large for predefined standard widths. You can also set a custom width {number}rem or use stretch or false.
contentWidthstring
false
(optional) Will set the width for its contents. Use small, medium, large for predefined standard widths. You can also set a custom width {number}rem or use stretch or false.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Translations

More info about translations can be found in the general localization and Eufemia Forms localization docs.

Keynb-NOen-GBsv-SEda-DK
PhoneNumber.labelMobilnummerMobile numberMobilnummerMobilnummer
PhoneNumber.countryCodeLabelLandskodeCountry codeLandskodLandskode
PhoneNumber.errorRequiredMobilnummer må fylles ut. Hvis du ikke har et mobilnummer, kan du oppgi et annet telefonnummer.Mobile number must be filled in. If you don’t have a mobile number, you can enter another phone number.Mobilnummer måste fyllas i. Om du inte har ett mobilnummer kan du ange ett annat telefonnummer.Mobilnummer skal udfyldes. Hvis du ikke har et mobilnummer, kan du indtaste et andet telefonnummer.
PhoneNumber.warningRequiredDu har ikke skrevet inn et mobilnummer. Du kan likevel bruke dette nummeret hvis det er riktig.You have not entered a mobile number. You can still use this number if it is correct.Du har inte angett ett mobilnummer. Du kan ändå använda detta nummer om det är korrekt.Du har ikke angivet et mobilnummer. Du kan stadig bruge dette nummer, hvis det er korrekt.
Field.errorSummaryTitleFeil som må rettesPlease correct the following errorsFel som måste åtgärdasFelter der skal rettes
Field.stateSummaryOppsummering:Summary:Sammanfattning:Oversigt:
Field.errorSummaryFeil som må rettes:Please correct the following errors:Fel som måste åtgärdas:Felter der skal rettes:
Field.errorRequiredDette feltet må fylles ut.This field is required.Detta fält måste fyllas i.Dette felt skal udfyldes.
Field.errorPatternVerdien er ugyldig.The value is invalid.Värdet är ogiltigt.Ugyldig værdi.
Field.optionalLabelSuffix(valgfritt)(optional)(valfritt)(valgfrit)

List of available countries

Link to the code of the available countries.

ISO 3166-1 alpha-2 codeennbsvda
AFAfghanistanAfghanistanAfghanistanAfghanistan
ALAlbaniaAlbaniaAlbanienAlbanien
DZAlgeriaAlgerieAlgerietAlgeriet
ASAmerican SamoaAmerikansk SamoaAmerikanska SamoaAmerikansk Samoa
ADAndorraAndorraAndorraAndorra
AOAngolaAngolaAngolaAngola
AIAnguillaAnguillaAnguillaAnguilla
AQAntarcticaAntarktisAntarktisAntarktis
AGAntigua and BarbudaAntigua og BarbudaAntigua och BarbudaAntigua og Barbuda
ARArgentinaArgentinaArgentinaArgentina
AMArmeniaArmeniaArmenienArmenien
AWArubaArubaArubaAruba
AUAustraliaAustraliaAustralienAustralien
ATAustriaØsterrikeÖsterrikeØstrig
AZAzerbaijanAserbajdsjanAzerbajdzjanAserbajdsjan
BSBahamasBahamasBahamasBahamas
BHBahrainBahrainBahrainBahrain
BDBangladeshBangladeshBangladeshBangladesh
BBBarbadosBarbadosBarbadosBarbados
BYBelarusBelarusVitrysslandHviderusland
BEBelgiumBelgiaBelgienBelgien
BZBelizeBelizeBelizeBelize
BJBeninBeninBeninBenin
BMBermudaBermudaBermudaBermuda
BTBhutanBhutanBhutanBhutan
BOBoliviaBoliviaBoliviaBolivia
BABosnia and HerzegovinaBosnia-HercegovinaBosnien och HercegovinaBosnien-Hercegovina
BWBotswanaBotswanaBotswanaBotswana
BVBouvet IslandBouvetøyaBouvetönBouvetøen
BRBrazilBrasilBrasilienBrasilien
IOBritish Indian Ocean TerritoryDet britiske territoriet i IndiahavetBrittiska territoriet i Indiska oceanenBritisk territorium i Det Indiske Ocean
VGBritish Virgin IslandsDe britiske JomfruøyerBrittiska JungfruöarnaBritiske Jomfruøer
BNBruneiBruneiBruneiBrunei
BGBulgariaBulgariaBulgarienBulgarien
BFBurkina FasoBurkina FasoBurkina FasoBurkina Faso
BIBurundiBurundiBurundiBurundi
KHCambodiaKambodsjaKambodjaCambodja
CMCameroonKamerunKamerunCameroun
CACanadaCanadaKanadaCanada
CVCape VerdeKapp VerdeKap VerdeKap Verde
BQBonaire, Sint Eustatius and SabaBonaire, Sint Eustatius og SabaBonaire, Sint Eustatius och SabaBonaire, Sint Eustatius og Saba
KYCayman IslandsCaymanøyeneCaymanöarnaCaymanøerne
CFCentral African RepublicDen sentralafrikanske republikkCentralafrikanska republikenCentralafrikanske Republik
TDChadTsjadTchadTchad
CLChileChileChileChile
CNChinaKinaKinaKina
CXChristmas IslandJuleøyaJulönJuleøen
CCCocos IslandsKokosøyeneKokosöarnaCocosøerne
COColombiaColombiaColombiaColombia
KMComorosKomoreneKomorernaComorerne
CKCook IslandsCookøyeneCooköarnaCookøerne
CRCosta RicaCosta RicaCosta RicaCosta Rica
HRCroatiaKroatiaKroatienKroatien
CUCubaCubaKubaCuba
CWCuraçaoCuraçaoCuraçaoCuraçao
CYCyprusKyprosCypernCypern
CZCzech RepublicTsjekkiaTjeckienTjekkiet
CDCongo, the Democratic RepublicKongo, den demokratiske republikkenKongo-KinshasaDen Demokratiske Republik Congo
DKDenmarkDanmarkDanmarkDanmark
DJDjiboutiDjiboutiDjiboutiDjibouti
DMDominicaDominicaDominicaDominica
DODominican RepublicDen dominikanske republikkDominikanska republikenDen Dominikanske Republik
TLEast TimorØst-TimorÖsttimorØsttimor
ECEcuadorEcuadorEcuadorEcuador
EGEgyptEgyptEgyptenEgypten
SVEl SalvadorEl SalvadorEl SalvadorEl Salvador
GQEquatorial GuineaEkvatorial-GuineaEkvatorialguineaÆkvatorialguinea
EREritreaEritreaEritreaEritrea
EEEstoniaEstlandEstlandEstland
SZEswatiniEswatiniSwazilandEswatini
ETEthiopiaEtiopiaEtiopienEtiopien
FKFalkland IslandsFalklandsøyeneFalklandsöarnaFalklandsøerne
FOFaroe IslandsFærøyeneFäröarnaFærøerne
FJFijiFijiFijiFiji
FIFinlandFinlandFinlandFinland
FRFranceFrankrikeFrankrikeFrankrig
GFFrench GuianaFransk GuyanaFranska GuyanaFransk Guyana
PFFrench PolynesiaFransk PolynesiaFranska PolynesienFransk Polynesien
TFFrench Southern and Antarctic LandsDe franske sørterritorierFranska sydterritoriernaFranske Sydterritorier
GAGabonGabonGabonGabon
GMGambiaGambiaGambiaGambia
GEGeorgiaGeorgiaGeorgienGeorgien
DEGermanyTysklandTysklandTyskland
GHGhanaGhanaGhanaGhana
GIGibraltarGibraltarGibraltarGibraltar
GRGreeceHellasGreklandGrækenland
GLGreenlandGrønlandGrönlandGrønland
GDGrenadaGrenadaGrenadaGrenada
GPGuadeloupeGuadeloupeGuadeloupeGuadeloupe
GUGuamGuamGuamGuam
GTGuatemalaGuatemalaGuatemalaGuatemala
GGGuernseyGuernseyGuernseyGuernsey
GNGuineaGuineaGuineaGuinea
GWGuinea-BissauGuinea-BissauGuinea-BissauGuinea-Bissau
GYGuyanaGuyanaGuyanaGuyana
HTHaitiHaitiHaitiHaiti
HMHeard Island and McDonald IslandsHeard- og McDonaldøyeneHeard- och McDonaldöarnaHeard- og McDonaldøerne
HNHondurasHondurasHondurasHonduras
HKHong KongHongkongHongkongHongkong
HUHungaryUngarnUngernUngarn
ISIcelandIslandIslandIsland
INIndiaIndiaIndienIndien
IDIndonesiaIndonesiaIndonesienIndonesien
IRIranIranIranIran
IQIraqIrakIrakIrak
IEIrelandIrlandIrlandIrland
IMIsle of ManManIsle of ManIsle of Man
ILIsraelIsraelIsraelIsrael
ITItalyItaliaItalienItalien
CIIvory CoastElfenbenskystenElfenbenskustenElfenbenskysten
JMJamaicaJamaicaJamaicaJamaica
JPJapanJapanJapanJapan
JEJerseyJerseyJerseyJersey
JOJordanJordanJordanienJordan
KZKazakhstanKasakhstanKazakstanKasakhstan
KEKenyaKenyaKenyaKenya
KIKiribatiKiribatiKiribatiKiribati
XKKosovoKosovoKosovoKosovo
KWKuwaitKuwaitKuwaitKuwait
KGKyrgyzstanKirgisistanKirgizistanKirgisistan
LALaosLaosLaosLaos
LVLatviaLatviaLettlandLetland
LBLebanonLibanonLibanonLibanon
LSLesothoLesothoLesothoLesotho
LRLiberiaLiberiaLiberiaLiberia
LYLibyaLibyaLibyenLibyen
LILiechtensteinLiechtensteinLiechtensteinLiechtenstein
LTLithuaniaLitauenLitauenLitauen
LULuxembourgLuxembourgLuxemburgLuxembourg
MOMacaoMacaoMacaoMacao
MGMadagascarMadagaskarMadagaskarMadagaskar
MWMalawiMalawiMalawiMalawi
MYMalaysiaMalaysiaMalaysiaMalaysia
MVMaldivesMaldiveneMaldivernaMaldiverne
MLMaliMaliMaliMali
MTMaltaMaltaMaltaMalta
MHMarshall IslandsMarshalløyeneMarshallöarnaMarshalløerne
MQMartiniqueMartiniqueMartiniqueMartinique
MRMauritaniaMauritaniaMauretanienMauretanien
MUMauritiusMauritiusMauritiusMauritius
YTMayotteMayotteMayotteMayotte
MXMexicoMexicoMexikoMexico
FMMicronesiaMikronesiaMikronesienMikronesien
MDMoldovaMoldovaMoldavienMoldova
MCMonacoMonacoMonacoMonaco
MNMongoliaMongoliaMongolietMongoliet
MEMontenegroMontenegroMontenegroMontenegro
MSMontserratMontserratMontserratMontserrat
MAMoroccoMarokkoMarockoMarokko
MZMozambiqueMosambikMoçambiqueMozambique
MMMyanmarMyanmarMyanmarMyanmar
NANamibiaNamibiaNamibiaNamibia
NRNauruNauruNauruNauru
NPNepalNepalNepalNepal
NLNetherlandsNederlandNederländernaHolland
NCNew CaledoniaNy-CaledoniaNya KaledonienNy Kaledonien
NZNew ZealandNew ZealandNya ZeelandNew Zealand
NINicaraguaNicaraguaNicaraguaNicaragua
NENigerNigerNigerNiger
NGNigeriaNigeriaNigeriaNigeria
NUNiueNiueNiueNiue
NFNorfolk IslandNorfolkøyaNorfolkönNorfolkøen
KPNorth KoreaNord-KoreaNordkoreaNordkorea
MKNorth MacedoniaNord-MakedoniaMakedonienNordmakedonien
MPNorthern Mariana IslandsNord-MarianeneNordmarianernaNordmarianerne
NONorwayNorgeNorgeNorge
OMOmanOmanOmanOman
PKPakistanPakistanPakistanPakistan
PWPalauPalauPalauPalau
PSPalestinePalestinaPalestinaPalæstina
PAPanamaPanamaPanamaPanama
PGPapua New GuineaPapua Ny-GuineaPapua Nya GuineaPapua Ny Guinea
PYParaguayParaguayParaguayParaguay
PEPeruPeruPeruPeru
PHPhilippinesFilippineneFilippinernaFilippinerne
PNPitcairnPitcairnøyenePitcairnöarnaPitcairnøerne
PLPolandPolenPolenPolen
PTPortugalPortugalPortugalPortugal
PRPuerto RicoPuerto RicoPuerto RicoPuerto Rico
QAQatarQatarQatarQatar
CGCongo, the RepublicKongo, republikkenKongo-BrazzavilleRepublikken Congo
RERéunionRéunionRéunionRéunion
RORomaniaRomaniaRumänienRumænien
RURussiaRusslandRysslandRusland
RWRwandaRwandaRwandaRwanda
BLSaint-BarthélemySaint-BarthélemySaint-BarthélemySaint-Barthélemy
SHSaint Helena, Ascension and Tristan da CunhaSaint Helena, Ascension og Tristan da CunhaSaint Helena, Ascension och Tristan da CunhaSaint Helena, Ascension og Tristan da Cunha
KNSaint Kitts and NevisSaint Kitts og NevisSaint Kitts och NevisSaint Kitts og Nevis
LCSaint LuciaSaint LuciaSaint LuciaSaint Lucia
MFSaint-Martin (FR)Saint-Martin (FR)Saint-Martin (Franska delen)Saint-Martin (FR)
PMSaint Pierre and MiquelonSaint Pierre og MiquelonSaint-Pierre och MiquelonSaint Pierre og Miquelon
VCSaint Vincent and the GrenadinesSaint Vincent og GrenadineneSaint Vincent och GrenadinernaSaint Vincent og Grenadinerne
WSSamoaSamoaSamoaSamoa
SMSan MarinoSan MarinoSan MarinoSan Marino
STSao Tome and PrincipeSão Tomé og PríncipeSão Tomé och PríncipeSão Tomé og Príncipe
SASaudi ArabiaSaudi-ArabiaSaudi-ArabienSaudi-Arabien
SNSenegalSenegalSenegalSenegal
RSSerbiaSerbiaSerbienSerbien
SCSeychellesSeychelleneSeychellernaSeychellerne
SLSierra LeoneSierra LeoneSierra LeoneSierra Leone
SGSingaporeSingaporeSingaporeSingapore
SXSint Maarten (NL)Sint Maarten (NL)Sint Maarten (Nederländerna)Sint Maarten (NL)
SKSlovakiaSlovakiaSlovakienSlovakiet
SISloveniaSloveniaSlovenienSlovenien
SBSolomon IslandsSalomonøyeneSalomonöarnaSalomonøerne
SOSomaliaSomaliaSomaliaSomalia
ZASouth AfricaSør-AfrikaSydafrikaSydafrika
GSSouth Georgia and the South Sandwich IslandsSør-Georgia og Sør-SandwichøyeneSydgeorgien och SydsandwichöarnaSydgeorgien og Sydsandwichøerne
KRSouth KoreaSør-KoreaSydkoreaSydkorea
SSSouth SudanSør-SudanSydsudanSydsudan
ESSpainSpaniaSpanienSpanien
LKSri LankaSri LankaSri LankaSri Lanka
SDSudanSudanSudanSudan
SRSurinameSurinamSurinamSurinam
SJSvalbard and Jan MayenSvalbard og Jan MayenSvalbard och Jan MayenSvalbard og Jan Mayen
SESwedenSverigeSverigeSverige
CHSwitzerlandSveitsSchweizSchweiz
SYSyriaSyriaSyrienSyrien
TWTaiwanTaiwanTaiwanTaiwan
TJTajikistanTadsjikistanTadzjikistanTadsjikistan
TZTanzaniaTanzaniaTanzaniaTanzania
THThailandThailandThailandThailand
TGTogoTogoTogoTogo
TKTokelauTokelauTokelauTokelau
TOTongaTongaTongaTonga
TTTrinidad and TobagoTrinidad og TobagoTrinidad och TobagoTrinidad og Tobago
TNTunisiaTunisiaTunisienTunesien
TRTurkeyTyrkiaTurkietTyrkiet
TMTurkmenistanTurkmenistanTurkmenistanTurkmenistan
TCTurks and Caicos IslandsTurks- og CaicosøyeneTurks- och CaicosöarnaTurks- og Caicosøerne
TVTuvaluTuvaluTuvaluTuvalu
VIVirgin Islands (U.S)De amerikanske JomfruøyerAmerikanska JungfruöarnaAmerikanske Jomfruøer
UGUgandaUgandaUgandaUganda
UAUkraineUkrainaUkrainaUkraine
AEUnited Arab EmiratesDe forente arabiske emiraterFörenade ArabemiratenDe Forenede Arabiske Emirater
GBUnited KingdomStorbritanniaStorbritannienStorbritannien
USUnited StatesUSAUSAUSA
UMUnited States Minor Outlying IslandsUSAs ytre småøyerUSA:s yttre öarUSA’s ydre småøer
UYUruguayUruguayUruguayUruguay
UZUzbekistanUsbekistanUzbekistanUsbekistan
VUVanuatuVanuatuVanuatuVanuatu
VAVaticanVatikanstatenVatikanstatenVatikanstaten
VEVenezuelaVenezuelaVenezuelaVenezuela
VNVietnamVietnamVietnamVietnam
WFWallis and FutunaWallis og FutunaWallis och FutunaWallis og Futuna
EHWestern SaharaVest-SaharaVästsaharaVestsahara
YEYemenJemenJemenYemen
ZMZambiaZambiaZambiaZambia
ZWZimbabweZimbabweZimbabweZimbabwe
AXÅland IslandsÅlandÅlandÅland