Class IntegerDefinition
- Namespace
- Dynamicweb.CoreUI.Data.Validation
- Assembly
- Dynamicweb.CoreUI.dll
Constrains a value to a whole number. Renders as a step of 1 on a Number editor, so the browser rejects a fractional value before it is posted - a number editor left on the default "any" step accepts one, and the value is then coerced on deserialization with nothing left to validate server-side.
public sealed class IntegerDefinition : ValidationDefinition
- Inheritance
-
IntegerDefinition
- Inherited Members
Constructors
IntegerDefinition()
public IntegerDefinition()
IntegerDefinition(string?)
public IntegerDefinition(string? errorMessage)
Parameters
errorMessagestring
Properties
ValidityStateReason
The native HTML ValidityState property (e.g. "patternMismatch", "tooLong") this validation corresponds to, if any. Used to pick the right message client-side against the browser's live validity state instead of a value snapshotted at render time. Defaults to null so existing third-party subclasses keep compiling unchanged.
public override string ValidityStateReason { get; }
Property Value
Methods
Render(EditorBase)
public override void Render(EditorBase editor)
Parameters
editorEditorBase
Validate(object?)
public override bool Validate(object? value)
Parameters
valueobject