ShinobiControls Xamarin Bindings Documentation

ShinobiForms : Shinobi.Forms Namespace

SFormTextFieldNumericValidator Class

A validator to check that a text field has a valid numeric string value.

Syntax

[Foundation.Register("SFormTextFieldNumericValidator", true)]
public class SFormTextFieldNumericValidator : Foundation.NSObject, ISFormTextFieldValidator, IDisposable

Remarks

This allows for strings including: - Integer values E.g. `12345` - Decimal values E.g. `123.45` (unless `allowDecimalValues` is `NO`). - Thousand-separated values E.g. `12,345` - Negative values E.g. `-12345` Empty strings are also valid. Use the `SFormTextFieldNotEmptyValidator` to mark these as invalid.

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

Members

See Also: Inherited members from Foundation.NSObject.

Public Constructors

Default constructor.
Documentation for this section has not yet been entered.

Protected Constructors

Documentation for this section has not yet been entered.
A constructor used when creating managed representations of unmanaged objects.

Public Properties

AllowDecimalValues bool . Whether values with a fractional part are valid (such as `123.45`).
AllowPartialStrings bool . Whether to treat numeric strings as whole strings when validating, or to allow partial strings.
[read-only]
override
ClassHandle IntPtr . The handle for this class.
InvalidMessage string . A string representing the invalid message to provide.

Public Methods

ValidateTextField (SFormTextField) : bool
Documentation for this section has not yet been entered.

Member Details

SFormTextFieldNumericValidator Constructor

Default constructor.

Syntax

[Foundation.Export("init")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public SFormTextFieldNumericValidator ()

Remarks

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

SFormTextFieldNumericValidator Constructor

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("initWithLocale:")]
public SFormTextFieldNumericValidator (Foundation.NSLocale locale)

Parameters

locale
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

SFormTextFieldNumericValidator Constructor

Documentation for this section has not yet been entered.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SFormTextFieldNumericValidator (Foundation.NSObjectFlag t)

Parameters

t
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

SFormTextFieldNumericValidator Constructor

A constructor used when creating managed representations of unmanaged objects.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
protected SFormTextFieldNumericValidator (IntPtr handle)

Parameters

handle
Handle of the unmanaged object

Remarks

You should not invoke this method directly.

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

AllowDecimalValues Property

Whether values with a fractional part are valid (such as `123.45`).

Syntax

[get: Foundation.Export("allowDecimalValues", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
[set: Foundation.Export("setAllowDecimalValues:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
public virtual bool AllowDecimalValues { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Defaults to `YES`.

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

AllowPartialStrings Property

Whether to treat numeric strings as whole strings when validating, or to allow partial strings.

Syntax

[get: Foundation.Export("allowPartialStrings", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
[set: Foundation.Export("setAllowPartialStrings:", ObjCRuntime.ArgumentSemantic.UnsafeUnretained)]
public virtual bool AllowPartialStrings { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

E.g. `1,000,0` could be entered as a partial string when trying to type `1,000,000`. When `allowPartialStrings` is `YES`, `1,000,0` would be valid, as it is possible to add more digits to create a valid number. When `allowPartialStrings` is `NO`, `1,000,0` would be invalid. Normal validation will still be run, so `1,000,0000` would be invalid in both cases, as it is not possible to keep adding digits to create a valid number. Defaults to `NO`, to treat all numeric strings as fully-formed numbers.

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

ClassHandle Property

The handle for this class.

Syntax

public override IntPtr ClassHandle { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

InvalidMessage Property

A string representing the invalid message to provide.

Syntax

[get: Foundation.Export("invalidMessage")]
[set: Foundation.Export("setInvalidMessage:")]
public virtual string InvalidMessage { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4

ValidateTextField Method

Documentation for this section has not yet been entered.

Syntax

[Foundation.Export("validateTextField:")]
public virtual bool ValidateTextField (SFormTextField field)

Parameters

field
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Shinobi.Forms
Assembly: ShinobiForms (in ShinobiForms.dll)
Assembly Versions: 1.0.0.4