Skip to content

Properties

Field-specific properties

TypeDescription
countries"Scandinavia"
"Nordic"
"Europe"
"Prioritized"
(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 property 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 combined E.164 value e.g. pattern="^\+47[49]\d{7}
quot;
.
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.
countryCodeLabelReact.ReactNode(optional) Label to show above / before the country code field.
numberLabelReact.ReactNode(optional) Label to show above / before the number field. Defaults to the translated label from PhoneNumber.label.
numberMaskVarious(optional) See property mask of the InputMasked component.
widthstring
false
(optional) large for predefined standard width, stretch for fill available width.
labelstring(optional) Label to show on the FieldBlock (wrapper around the phone number fields). Use numberLabel to customize the label for the number input field.
labelDescriptionstring(optional) Description text shown below the label on the FieldBlock (wrapper around the phone number fields).
labelSrOnlyboolean(optional) Use true to make the label only readable by screen readers.
sizestring
number
(optional) The sizes you can choose are small (1.5rem), default (2rem), medium (2.5rem) and large (3rem). 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

TypeDescription
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.ReactNode
Array<React.ReactNode>
function
(optional) Info message shown below / after the field by default. Use statusPosition="above" to show status messages above 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.ReactNode
Array<React.ReactNode>
function
(optional) Warning message shown below / after the field by default. Use statusPosition="above" to show status messages above 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.ReactNode(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-property 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 it's 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.
labelDescriptionInlineboolean(optional) If true, the labelDescription will be displayed on the same line as the label.
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.ReactNode. 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, set outset to false to display the help text inline (inset) instead of the default outset behavior, or use renderAs set to dialog to render the content in a Dialog (recommended for larger amounts of content).
hideHelpButtonboolean(optional) Set true when you render the inline help button outside the label (e.g. inside a checkbox suffix) so FieldBlock skips drawing the default label help button.
statusPosition"below"
"above"
(optional) Controls where status messages (error, warning, information) are visually shown. Use below (default) or above.
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.numberLabelMobilnummerMobile 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.errorPatternDu må skrive inn en gyldig verdi.You must enter a valid value.Du måste ange ett giltigt värde.Du skal indtaste en gyldig 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 codeennb
AFAfghanistanAfghanistan
ALAlbaniaAlbania
DZAlgeriaAlgerie
ASAmerican SamoaAmerikansk Samoa
ADAndorraAndorra
AOAngolaAngola
AIAnguillaAnguilla
AQAntarcticaAntarktis
AGAntigua and BarbudaAntigua og Barbuda
ARArgentinaArgentina
AMArmeniaArmenia
AWArubaAruba
AUAustraliaAustralia
ATAustriaØsterrike
AZAzerbaijanAserbajdsjan
BSBahamasBahamas
BHBahrainBahrain
BDBangladeshBangladesh
BBBarbadosBarbados
BYBelarusBelarus
BEBelgiumBelgia
BZBelizeBelize
BJBeninBenin
BMBermudaBermuda
BTBhutanBhutan
BOBoliviaBolivia
BABosnia and HerzegovinaBosnia-Hercegovina
BWBotswanaBotswana
BVBouvet IslandBouvetøya
BRBrazilBrasil
IOBritish Indian Ocean TerritoryDet britiske territoriet i Indiahavet
VGBritish Virgin IslandsDe britiske Jomfruøyer
BNBruneiBrunei
BGBulgariaBulgaria
BFBurkina FasoBurkina Faso
BIBurundiBurundi
KHCambodiaKambodsja
CMCameroonKamerun
CACanadaCanada
CVCape VerdeKapp Verde
BQBonaire, Sint Eustatius and SabaBonaire, Sint Eustatius og Saba
KYCayman IslandsCaymanøyene
CFCentral African RepublicDen sentralafrikanske republikk
TDChadTsjad
CLChileChile
CNChinaKina
CXChristmas IslandJuleøya
CCCocos IslandsKokosøyene
COColombiaColombia
KMComorosKomorene
CKCook IslandsCookøyene
CRCosta RicaCosta Rica
HRCroatiaKroatia
CUCubaCuba
CWCuraçaoCuraçao
CYCyprusKypros
CZCzech RepublicTsjekkia
CDCongo, the Democratic RepublicKongo, den demokratiske republikken
DKDenmarkDanmark
DJDjiboutiDjibouti
DMDominicaDominica
DODominican RepublicDen dominikanske republikk
TLEast TimorØst-Timor
ECEcuadorEcuador
EGEgyptEgypt
SVEl SalvadorEl Salvador
GQEquatorial GuineaEkvatorial-Guinea
EREritreaEritrea
EEEstoniaEstland
SZEswatiniEswatini
ETEthiopiaEtiopia
FKFalkland IslandsFalklandsøyene
FOFaroe IslandsFærøyene
FJFijiFiji
FIFinlandFinland
FRFranceFrankrike
GFFrench GuianaFransk Guyana
PFFrench PolynesiaFransk Polynesia
TFFrench Southern and Antarctic LandsDe franske sørterritorier
GAGabonGabon
GMGambiaGambia
GEGeorgiaGeorgia
DEGermanyTyskland
GHGhanaGhana
GIGibraltarGibraltar
GRGreeceHellas
GLGreenlandGrønland
GDGrenadaGrenada
GPGuadeloupeGuadeloupe
GUGuamGuam
GTGuatemalaGuatemala
GGGuernseyGuernsey
GNGuineaGuinea
GWGuinea-BissauGuinea-Bissau
GYGuyanaGuyana
HTHaitiHaiti
HMHeard Island and McDonald IslandsHeard- og McDonaldøyene
HNHondurasHonduras
HKHong KongHongkong
HUHungaryUngarn
ISIcelandIsland
INIndiaIndia
IDIndonesiaIndonesia
IRIranIran
IQIraqIrak
IEIrelandIrland
IMIsle of ManMan
ILIsraelIsrael
ITItalyItalia
CIIvory CoastElfenbenskysten
JMJamaicaJamaica
JPJapanJapan
JEJerseyJersey
JOJordanJordan
KZKazakhstanKasakhstan
KEKenyaKenya
KIKiribatiKiribati
XKKosovoKosovo
KWKuwaitKuwait
KGKyrgyzstanKirgisistan
LALaosLaos
LVLatviaLatvia
LBLebanonLibanon
LSLesothoLesotho
LRLiberiaLiberia
LYLibyaLibya
LILiechtensteinLiechtenstein
LTLithuaniaLitauen
LULuxembourgLuxembourg
MOMacaoMacao
MGMadagascarMadagaskar
MWMalawiMalawi
MYMalaysiaMalaysia
MVMaldivesMaldivene
MLMaliMali
MTMaltaMalta
MHMarshall IslandsMarshalløyene
MQMartiniqueMartinique
MRMauritaniaMauritania
MUMauritiusMauritius
YTMayotteMayotte
MXMexicoMexico
FMMicronesiaMikronesia
MDMoldovaMoldova
MCMonacoMonaco
MNMongoliaMongolia
MEMontenegroMontenegro
MSMontserratMontserrat
MAMoroccoMarokko
MZMozambiqueMosambik
MMMyanmarMyanmar
NANamibiaNamibia
NRNauruNauru
NPNepalNepal
NLNetherlandsNederland
NCNew CaledoniaNy-Caledonia
NZNew ZealandNew Zealand
NINicaraguaNicaragua
NENigerNiger
NGNigeriaNigeria
NUNiueNiue
NFNorfolk IslandNorfolkøya
KPNorth KoreaNord-Korea
MKNorth MacedoniaNord-Makedonia
MPNorthern Mariana IslandsNord-Marianene
NONorwayNorge
OMOmanOman
PKPakistanPakistan
PWPalauPalau
PSPalestinePalestina
PAPanamaPanama
PGPapua New GuineaPapua Ny-Guinea
PYParaguayParaguay
PEPeruPeru
PHPhilippinesFilippinene
PNPitcairnPitcairnøyene
PLPolandPolen
PTPortugalPortugal
PRPuerto RicoPuerto Rico
QAQatarQatar
CGCongo, the RepublicKongo, republikken
RERéunionRéunion
RORomaniaRomania
RURussiaRussland
RWRwandaRwanda
BLSaint-BarthélemySaint-Barthélemy
SHSaint Helena, Ascension and Tristan da CunhaSaint Helena, Ascension og Tristan da Cunha
KNSaint Kitts and NevisSaint Kitts og Nevis
LCSaint LuciaSaint Lucia
MFSaint-Martin (FR)Saint-Martin (FR)
PMSaint Pierre and MiquelonSaint Pierre og Miquelon
VCSaint Vincent and the GrenadinesSaint Vincent og Grenadinene
WSSamoaSamoa
SMSan MarinoSan Marino
STSao Tome and PrincipeSão Tomé og Príncipe
SASaudi ArabiaSaudi-Arabia
SNSenegalSenegal
RSSerbiaSerbia
SCSeychellesSeychellene
SLSierra LeoneSierra Leone
SGSingaporeSingapore
SXSint Maarten (NL)Sint Maarten (NL)
SKSlovakiaSlovakia
SISloveniaSlovenia
SBSolomon IslandsSalomonøyene
SOSomaliaSomalia
ZASouth AfricaSør-Afrika
GSSouth Georgia and the South Sandwich IslandsSør-Georgia og Sør-Sandwichøyene
KRSouth KoreaSør-Korea
SSSouth SudanSør-Sudan
ESSpainSpania
LKSri LankaSri Lanka
SDSudanSudan
SRSurinameSurinam
SJSvalbard and Jan MayenSvalbard og Jan Mayen
SESwedenSverige
CHSwitzerlandSveits
SYSyriaSyria
TWTaiwanTaiwan
TJTajikistanTadsjikistan
TZTanzaniaTanzania
THThailandThailand
TGTogoTogo
TKTokelauTokelau
TOTongaTonga
TTTrinidad and TobagoTrinidad og Tobago
TNTunisiaTunisia
TRTurkeyTyrkia
TMTurkmenistanTurkmenistan
TCTurks and Caicos IslandsTurks- og Caicosøyene
TVTuvaluTuvalu
VIVirgin Islands (U.S)De amerikanske Jomfruøyer
UGUgandaUganda
UAUkraineUkraina
AEUnited Arab EmiratesDe forente arabiske emirater
GBUnited KingdomStorbritannia
USUnited StatesUSA
UMUnited States Minor Outlying IslandsUSAs ytre småøyer
UYUruguayUruguay
UZUzbekistanUsbekistan
VUVanuatuVanuatu
VAVaticanVatikanstaten
VEVenezuelaVenezuela
VNVietnamVietnam
WFWallis and FutunaWallis og Futuna
EHWestern SaharaVest-Sahara
YEYemenJemen
ZMZambiaZambia
ZWZimbabweZimbabwe
AXÅland IslandsÅland